Function at 0x51bd84
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xf8
push ebx
push ecx
push edx
push esi
push edi
mov dword [esp + 0x6c], eax
mov dword [esp + 0x64], ebx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x2c], 0
call sub.USER32.dll_GetFocus
mov esi, eax
push 0
call sub.USER32.dll_GetDC
mov edi, eax
mov dword [esp + 0x34], edi
mov eax, dword [0x5677c4]
and eax, 2
cmp eax, 0
je 0x51be0f
push 0x5a
push edi
call sub.GDI32.dll_GetDeviceCaps
push 0x48
push eax
push 8
call sub.KERNEL32.dll_MulDiv
mov ecx, eax
push 0xffffffffffffffff
movzx eax, byte [0x569324]
push eax
push 0
mov eax, edi
neg ecx
mov ebx, 0x569558
mov edx, 0xffffffff
call fcn.005180b8
mov edi, eax
mov eax, dword [edi + 0x5d]
mov dword [0x78dcb8], eax
mov eax, dword [edi + 0x61]
mov dword [0x78dcb4], eax
jmp 0x51be7d
lea ebx, [esp + 0xd0]
push ebx
push 0x3c
mov eax, dword [0x78de9b]
mov eax, dword [eax + 0x48]
push eax
call sub.GDI32.dll_GetObjectA
mov dword [esp + 0xe0], 0
mov byte [esp + 0xe4], 0
mov byte [esp + 0xe5], 0
mov byte [esp + 0xe6], 0
mov eax, edi
mov ecx, dword [0x78de9b]
mov ecx, dword [ecx + 0x4c]
call fcn.00517ee4
mov ebx, dword [eax + 0x5d]
mov dword [0x78dcb8], ebx
mov ebx, dword [eax + 0x61]
mov dword [0x78dcb4], ebx
call fcn.00518694
mov eax, dword [0x78de9b]
call fcn.00517e24
mov edi, eax
push 0
call sub.USER32.dll_GetSystemMetrics
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x48]
push eax
mov ebx, dword [esp + 0x38]
push ebx
call sub.GDI32.dll_SelectObject
mov dword [esp + 0x70], eax
push 0
push 0
push 0
push 0
lea eax, [esp + 0xd0]
mov dword [esp + 0x78], eax
push eax
call sub.USER32.dll_SetRect
mov ecx, dword [esp + 0x38]
mov eax, ecx
shr eax, 1
mov dword [esp + 0xc8], eax
mov eax, 0xc8
call fcn.0051cb68
mov edx, dword [esp + 0xc8]
cmp edx, eax
jae 0x51bf04
mov eax, 0xc8
call fcn.0051cb68
mov dword [esp + 0xc8], eax
push 3
push 2
push ecx
call sub.KERNEL32.dll_MulDiv
mov ecx, dword [esp + 0xc8]
cmp ecx, eax
jbe 0x51bf04
mov dword [esp + 0xc8], eax
push 0xc50
push dword [esp + 0x6c]
push 0xffffffffffffffff
push dword [esp + 0x78]
push ebx
call sub.USER32.dll_DrawTextA
lea eax, [esp + 0x98]
mov dword [esp + 0x60], eax
push eax
push 0x20
push ebx
call sub.GDI32.dll_GetTextFaceA
push 0x5a
push ebx
call sub.GDI32.dll_GetDeviceCaps
push eax
push 0x48
mov eax, dword [edi + 0x54]
neg eax
push eax
call sub.KERNEL32.dll_MulDiv
mov ebx, eax
push dword [esp + 0x70]
push dword [esp + 0x38]
call sub.GDI32.dll_SelectObject
push dword [esp + 0x34]
push 0
call sub.USER32.dll_ReleaseDC
add dword [esp + 0xc8], 0xa
mov eax, 5
call fcn.0051cb68
mov dword [esp + 0x54], eax
mov eax, 5
call fcn.0051cb68
mov ecx, dword [esp + 0xc8]
shl eax, 1
add ecx, eax
mov dword [esp + 0x28], ecx
mov eax, 5
call fcn.0051cb68
mov ecx, dword [esp + 0xcc]
shl eax, 1
add ecx, eax
mov dword [esp + 0x5c], ecx
push ebx
lea eax, [esp + 0xc0]
lea ebx, [esp + 0xbc]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
call fcn.0051c9f8
mov ebx, eax
mov ecx, dword [esp + 0x114]
mov eax, ecx
and eax, 0x1000
cmp eax, 0
je 0x51bfe0
mov eax, dword [esp + 0xbc]
or dword [eax], 2
mov eax, 0x2d
call fcn.0051cb4c
mov edx, dword [esp + 0x5c]
cmp edx, eax
jae 0x51c000
mov eax, 0x2d
call fcn.0051cb4c
mov dword [esp + 0x5c], eax
and ecx, 0xf0
cmp ecx, 0
je 0x51c0df
cmp ecx, 0x30
jne 0x51c01e
mov dword [esp + 0x74], 0x7f03
jmp 0x51c053
cmp ecx, 0x10
jne 0x51c02d
mov dword [esp + 0x74], 0x7f01
jmp 0x51c053
cmp ecx, 0x20
jne 0x51c03c
mov dword [esp + 0x74], 0x7f02
jmp 0x51c053
cmp ecx, 0x40
jne 0x51c04b
mov dword [esp + 0x74], 0x7f04
jmp 0x51c053
cmp ecx, 0xf0
je 0x51c063
push dword [esp + 0x74]
push 0
call sub.USER32.dll_LoadIconA
mov dword [0x78dcac], eax
push 0xb
call sub.USER32.dll_GetSystemMetrics
mov dword [esp + 0x58], eax
push 0xc
call sub.USER32.dll_GetSystemMetrics
mov ecx, eax
mov dword [esp + 0x78], ecx
mov eax, 5
call fcn.0051cb68
mov edx, dword [esp + 0x58]
add eax, edx
mov edx, dword [esp + 0x54]
add edx, eax
mov dword [esp + 0x54], edx
add dword [esp + 0x28], edx
mov eax, dword [esp + 0x5c]
sub eax, ecx
mov ecx, 2
cdq
idiv ecx
mov edx, eax
mov eax, 5
call fcn.0051cb68
mov ecx, eax
push dword [esp + 0x58]
push dword [esp + 0x7c]
push 0xa90
push 0x40000003
push 0x5694cc
push 0x5694c8
mov eax, dword [esp + 0xd0]
call fcn.0051c4f8
add ebx, eax
mov eax, dword [esp + 0x5c]
sub eax, dword [esp + 0xcc]
mov ecx, 2
cdq
idiv ecx
mov edx, eax
push dword [esp + 0xc8]
push dword [esp + 0xd0]
push 0xffffffffffffffff
push 0x40000080
push str.static
push dword [esp + 0x80]
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0xd0]
call fcn.0051c4f8
add ebx, eax
cmp dword [esp + 0x7c], 0
jne 0x51c136
mov dword [esp + 0x7c], 1
mov eax, 0
cmp eax, 8
jge 0x51c16a
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x30], ecx
mov ecx, eax
imul edx, ecx, 0xd
mov ecx, dword [esp + 0x110]
mov edx, dword [ecx + edx + 4]
mov ecx, dword [esp + 0x30]
and ecx, edx
cmp ecx, 0
je 0x51c167
inc dword [esp + 0x2c]
inc eax
jmp 0x51c13b
mov eax, 0x32
call fcn.0051cb68
mov ecx, eax
mov eax, 5
call fcn.0051cb68
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x2c]
mov eax, edx
imul ecx, eax
mov eax, dword [esp + 0x50]
dec edx
imul eax, edx
add ecx, eax
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x28]
mov edx, eax
sub edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x24]
cmp ecx, edx
jle 0x51c1cf
mov eax, 5
call fcn.0051cb68
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x54]
mov edx, ecx
add eax, edx
mov edx, dword [esp + 0x4c]
shl edx, 1
add eax, edx
mov dword [esp + 0x28], eax
sub eax, ecx
mov ecx, 2
cdq
idiv ecx
mov ecx, eax
mov dword [0x78dcb0], 0
mov eax, 0
mov dword [esp + 0x20], eax
cmp eax, 8
jge 0x51c26e
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x1c], edx
imul edx, eax, 0xd
mov dword [esp + 0x80], edx
mov eax, dword [esp + 0x110]
mov edx, dword [eax + edx + 4]
mov eax, dword [esp + 0x1c]
and eax, edx
cmp eax, 0
jne 0x51c244
jmp 0x51c263
mov eax, dword [esp + 0x48]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x110]
mov edx, dword [edx + eax + 4]
mov eax, dword [esp + 0x18]
and eax, edx
cmp eax, 0
jne 0x51c24d
jmp 0x51c263
cmp dword [0x78dcb0], 0
jne 0x51c21d
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x110]
mov eax, dword [edx + eax]
mov dword [0x78dcb0], eax
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
jmp 0x51c1ee
mov eax, 0
mov dword [esp + 0x44], eax
cmp eax, 8
jge 0x51c3b2
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x14], edx
imul edx, eax, 0xd
mov dword [esp + 0x84], edx
mov eax, dword [esp + 0x110]
mov edx, dword [eax + edx + 4]
mov eax, dword [esp + 0x14]
and eax, edx
cmp eax, 0
je 0x51c399
mov dword [esp + 0x88], 0x40010000
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x110]
mov eax, dword [edx + eax]
cmp dword [0x78dcb0], eax
jne 0x51c2da
or dword [esp + 0x88], 1
jmp 0x51c2e8
mov eax, dword [esp + 0x88]
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x84]
cmp byte [edx + eax + 0xc], 0
je 0x51c306
mov eax, dword [esp + 0x44]
add eax, 0x7f00
call fcn.0042ae94
jmp 0x51c30b
mov eax, 0
mov dword [esp + 0x8c], eax
cmp eax, 0
jne 0x51c329
mov eax, dword [esp + 0x84]
mov eax, dword [edx + eax + 8]
mov dword [esp + 0x8c], eax
mov eax, 0x32
call fcn.0051cb68
mov dword [esp + 0x40], eax
mov eax, 0xe
call fcn.0051cb4c
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x8c]
mov eax, dword [edx + eax]
push eax
push dword [esp + 0x94]
push str.button
push dword [esp + 0xa0]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0xd0]
call fcn.0051c4f8
add ebx, eax
mov eax, 5
call fcn.0051cb68
mov edx, eax
mov eax, 0x32
call fcn.0051cb68
add edx, eax
add ecx, edx
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x44], eax
jmp 0x51c277
mov ebx, dword [eax + 0x83]
jmp 0x51c43d
mov eax, 5
call fcn.0051cb4c
mov ebx, eax
mov eax, 0xe
call fcn.0051cb4c
add ebx, eax
mov eax, dword [esp + 0x5c]
add eax, ebx
call fcn.0051cb14
mov ebx, eax
mov eax, dword [esp + 0x28]
call fcn.0051cb30
mov dword [esp + 0x90], eax
push dword [esp + 0xb8]
call sub.KERNEL32.dll_GlobalLock
mov dword [esp + 0xbc], eax
mov ecx, dword [esp + 0xbc]
mov ax, word [esp + 0x90]
mov word [ecx + 0xe], ax
mov ecx, dword [esp + 0xbc]
mov ax, bx
mov word [ecx + 0x10], ax
mov eax, dword [0x56b97c]
mov eax, dword [eax + 0x10]
cmp eax, 0
jne 0x51c42d
mov eax, dword [0x5677e0]
cmp eax, 0
jne 0x51c3a7
call sub.USER32.dll_GetActiveWindow
mov ebx, eax
call fcn.00533100
mov dword [esp + 0x94], eax
cmp eax, 0xffffffff
je 0x51c453
call fcn.00533390
mov eax, dword [edi + 0x48]
push eax
push 0x51c600
push ebx
push dword [esp + 0xc8]
push dword [0x567830]
call sub.USER32.dll_DialogBoxIndirectParamA
mov ebx, eax
cmp dword [esp + 0x94], 0xffffffff
je 0x51c480
call fcn.00533344
mov eax, dword [0x56b980]
call fcn.005332ac
mov eax, edi
call fcn.00518694
push dword [esp + 0xb8]
call sub.KERNEL32.dll_GlobalUnlock
mov eax, dword [esp + 0xb8]
call fcn.00531324
push esi
call sub.USER32.dll_SetFocus
mov ecx, 0
cmp ecx, 8
jge 0x51c4e2
mov edx, dword [esp + 0x7c]
mov eax, ecx
imul edi, eax, 0xd
mov eax, dword [esp + 0x110]
mov esi, dword [eax + edi + 4]
and edx, esi
cmp edx, 0
je 0x51c4df
cmp dword [eax + edi], ebx
jne 0x51c4df
mov eax, dword [eax + edi + 4]
jmp 0x51c4e7
inc ecx
jmp 0x51c4b4
mov eax, 0
pop edi
pop esi
pop edx
pop ecx
pop ebx
add esp, 0xf8
ret 8