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

Disassembly:
sub esp, 0xb4
push ebx
push ecx
push edx
push esi
push edi
push ebp
mov dword [esp + 0x6c], eax
mov dword [esp + 0x64], ebx
mov edi, ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x30], 0
call sub.USER32.dll_GetFocus
mov esi, eax
push 0
call sub.USER32.dll_GetDC
mov ebp, eax
mov dword [esp + 0x38], ebp
mov eax, dword [0x5d5c00]
and eax, 2
cmp eax, 0
je 0x504e59
push 0x5a
push ebp
call sub.GDI32.dll_GetDeviceCaps
push 0x48
push eax
push 8
call sub.KERNEL32.dll_MulDiv
neg eax
push 0x5d3938
push 0
push 0
push 0
push 4
movzx ebx, byte [0x5d3744]
push ebx
push 0
push 0
push 0
push 0x190
push 0
push 0
push 0
push eax
call sub.GDI32.dll_CreateFontA
mov ebx, eax
mov eax, ebp
mov ecx, 0xffffffff
call fcn.0050146c
mov ebp, eax
jmp 0x504e65
mov eax, dword [0x595fa7]
call fcn.005013b0
mov ebp, eax
mov eax, ebp
mov ebx, dword [esp + 0x38]
call fcn.00501aa4
mov eax, dword [ebp + 0x5d]
mov dword [0x595dc4], eax
mov eax, dword [ebp + 0x61]
mov dword [0x595dc0], eax
mov eax, dword [ebp + 0x48]
push eax
push ebx
call sub.GDI32.dll_SelectObject
mov dword [esp + 0x70], eax
mov eax, 0xc8
call fcn.00505ab0
push 0
push eax
push 0
push 0
lea eax, [esp + 0xcc]
mov dword [esp + 0x78], eax
push eax
call sub.USER32.dll_SetRect
push 0xc50
push dword [esp + 0x6c]
push 0xffffffffffffffff
push dword [esp + 0x78]
push ebx
call sub.USER32.dll_DrawTextA
lea eax, [esp + 0x94]
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 [ebp + 0x54]
neg eax
push eax
call sub.KERNEL32.dll_MulDiv
mov ebx, eax
push dword [esp + 0x70]
push dword [esp + 0x3c]
call sub.GDI32.dll_SelectObject
push dword [esp + 0x38]
push 0
call sub.USER32.dll_ReleaseDC
add dword [esp + 0xc4], 0xa
mov eax, 5
call fcn.00505ab0
mov ecx, dword [esp + 0xc8]
shl eax, 1
add ecx, eax
mov dword [esp + 0x5c], ecx
mov eax, 5
call fcn.00505ab0
mov ecx, dword [esp + 0xc4]
shl eax, 1
add ecx, eax
mov dword [esp + 0x2c], ecx
mov eax, 5
call fcn.00505ab0
mov dword [esp + 0x54], eax
push ebx
lea eax, [esp + 0xbc]
lea ebx, [esp + 0xb8]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
call fcn.00505978
mov ebx, eax
mov ecx, dword [esp + 0xd4]
mov eax, ecx
and eax, 0x1000
cmp eax, 0
je 0x504f8c
mov eax, dword [esp + 0xb8]
or dword [eax], 2
mov eax, 0x2d
call fcn.00505aa0
mov edx, dword [esp + 0x5c]
cmp edx, eax
jae 0x504fac
mov eax, 0x2d
call fcn.00505aa0
mov dword [esp + 0x5c], eax
and ecx, 0xf0
cmp ecx, 0
je 0x50508b
cmp ecx, 0x30
jne 0x504fca
mov dword [esp + 0x74], 0x7f03
jmp 0x504fff
cmp ecx, 0x10
jne 0x504fd9
mov dword [esp + 0x74], 0x7f01
jmp 0x504fff
cmp ecx, 0x20
jne 0x504fe8
mov dword [esp + 0x74], 0x7f02
jmp 0x504fff
cmp ecx, 0x40
jne 0x504ff7
mov dword [esp + 0x74], 0x7f04
jmp 0x504fff
cmp ecx, 0xf0
je 0x50500f
push dword [esp + 0x74]
push 0
call sub.USER32.dll_LoadIconA
mov dword [0x595db8], 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.00505ab0
mov edx, dword [esp + 0x58]
add eax, edx
mov edx, dword [esp + 0x54]
add edx, eax
mov dword [esp + 0x54], edx
add dword [esp + 0x2c], edx
mov eax, dword [esp + 0x5c]
sub eax, ecx
mov ecx, 2
cdq
idiv ecx
mov edx, eax
mov eax, 5
call fcn.00505ab0
mov ecx, eax
push dword [esp + 0x58]
push dword [esp + 0x7c]
push 0xa90
push 0x40000003
push 0x5d38ac
push 0x5d38a8
mov eax, dword [esp + 0xcc]
call fcn.0050548c
add ebx, eax
mov eax, dword [esp + 0x5c]
sub eax, dword [esp + 0xc8]
mov ecx, 2
cdq
idiv ecx
mov edx, eax
push dword [esp + 0xc4]
push dword [esp + 0xcc]
push 0xffffffffffffffff
push 0x40000080
push str.static
push dword [esp + 0x80]
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0xcc]
call fcn.0050548c
add ebx, eax
cmp edi, 0
jne 0x5050dd
mov edi, 1
mov ecx, 0
cmp ecx, 8
jge 0x50510f
mov eax, edi
mov dword [esp + 0x34], eax
mov eax, ecx
imul edx, eax, 0xd
mov eax, dword [esp + 0xd0]
mov edx, dword [eax + edx + 4]
mov eax, dword [esp + 0x34]
and eax, edx
cmp eax, 0
je 0x50510c
inc dword [esp + 0x30]
inc ecx
jmp 0x5050e2
mov eax, 0x32
call fcn.00505ab0
mov ecx, eax
mov eax, 5
call fcn.00505ab0
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x30]
mov eax, edx
imul ecx, eax
mov eax, dword [esp + 0x50]
dec edx
imul eax, edx
add ecx, eax
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x2c]
mov edx, eax
sub edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x28]
cmp ecx, edx
jle 0x505174
mov eax, 5
call fcn.00505ab0
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 + 0x2c], eax
sub eax, ecx
mov ecx, 2
cdq
idiv ecx
mov ecx, eax
mov dword [0x595dbc], 0
mov edx, 0
mov dword [esp + 0x24], edx
cmp edx, 8
jge 0x505208
mov eax, edi
mov dword [esp + 0x20], eax
imul edx, edx, 0xd
mov dword [esp + 0x7c], edx
mov eax, dword [esp + 0xd0]
mov edx, dword [eax + edx + 4]
mov eax, dword [esp + 0x20]
and eax, edx
cmp eax, 0
jne 0x5051e1
jmp 0x5051fd
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0xd0]
mov edx, dword [edx + eax + 4]
mov eax, dword [esp + 0x1c]
and eax, edx
cmp eax, 0
jne 0x5051ea
jmp 0x5051fd
cmp dword [0x595dbc], 0
jne 0x5051bd
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0xd0]
mov eax, dword [edx + eax]
mov dword [0x595dbc], eax
mov edx, dword [esp + 0x24]
inc edx
mov dword [esp + 0x24], edx
jmp 0x505193
mov edx, 0
mov dword [esp + 0x44], edx
cmp edx, 8
jge 0x505347
mov eax, edi
mov dword [esp + 0x18], eax
imul edx, edx, 0xd
mov dword [esp + 0x80], edx
mov eax, dword [esp + 0xd0]
mov edx, dword [eax + edx + 4]
mov eax, dword [esp + 0x18]
and eax, edx
cmp eax, 0
je 0x505331
mov dword [esp + 0x84], 0x40010000
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0xd0]
mov eax, dword [edx + eax]
cmp dword [0x595dbc], eax
jne 0x505272
or dword [esp + 0x84], 1
jmp 0x505280
mov eax, dword [esp + 0x84]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x80]
cmp byte [edx + eax + 0xc], 0
je 0x50529e
mov eax, dword [esp + 0x44]
add eax, 0x7f00
call fcn.0041c444
jmp 0x5052a3
mov eax, 0
mov dword [esp + 0x88], eax
cmp eax, 0
jne 0x5052c1
mov eax, dword [esp + 0x80]
mov eax, dword [edx + eax + 8]
mov dword [esp + 0x88], eax
mov eax, 0x32
call fcn.00505ab0
mov dword [esp + 0x40], eax
mov eax, 0xe
call fcn.00505aa0
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x88]
mov eax, dword [edx + eax]
push eax
push dword [esp + 0x90]
push str.button
push dword [esp + 0x9c]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0xcc]
call fcn.0050548c
add ebx, eax
mov eax, 5
call fcn.00505ab0
mov edx, eax
mov eax, 0x32
call fcn.00505ab0
add edx, eax
add ecx, edx
mov edx, dword [esp + 0x44]
inc edx
mov dword [esp + 0x44], edx
jmp 0x505211
mov ebx, dword [eax + 0x7f]
jmp 0x5053d2
mov eax, 5
call fcn.00505aa0
mov ebx, eax
mov eax, 0xe
call fcn.00505aa0
add ebx, eax
mov eax, dword [esp + 0x5c]
add eax, ebx
call fcn.00505a80
mov ebx, eax
mov eax, dword [esp + 0x2c]
call fcn.00505a90
mov dword [esp + 0x8c], eax
push dword [esp + 0xb4]
call sub.KERNEL32.dll_GlobalLock
mov dword [esp + 0xb8], eax
mov ecx, dword [esp + 0xb8]
mov ax, word [esp + 0x8c]
mov word [ecx + 0xe], ax
mov ecx, dword [esp + 0xb8]
mov ax, bx
mov word [ecx + 0x10], ax
mov eax, dword [0x5d5b44]
mov eax, dword [eax + 0x10]
cmp eax, 0
jne 0x5053c2
mov eax, dword [0x5d5bdc]
cmp eax, 0
jne 0x50533f
call sub.USER32.dll_GetActiveWindow
mov ebx, eax
call fcn.00516038
mov dword [esp + 0x90], eax
cmp eax, 0xffffffff
je 0x5053e8
call fcn.005162c8
mov eax, dword [ebp + 0x48]
push eax
push 0x505598
push ebx
push dword [esp + 0xc4]
push dword [0x5d5cac]
call sub.USER32.dll_DialogBoxIndirectParamA
mov ebx, eax
cmp dword [esp + 0x90], 0xffffffff
je 0x505415
call fcn.0051627c
mov eax, dword [0x5d5b48]
call fcn.005161e4
mov eax, ebp
call fcn.00501c60
push dword [esp + 0xb4]
call sub.KERNEL32.dll_GlobalUnlock
mov eax, dword [esp + 0xb4]
call fcn.00514388
push esi
call sub.USER32.dll_SetFocus
mov edx, 0
cmp edx, 8
jge 0x505475
mov eax, edi
mov ecx, edx
imul ebp, ecx, 0xd
mov ecx, dword [esp + 0xd0]
mov esi, dword [ecx + ebp + 4]
and eax, esi
cmp eax, 0
je 0x505472
cmp dword [ecx + ebp], ebx
jne 0x505472
mov eax, dword [ecx + ebp + 4]
jmp 0x50547a
inc edx
jmp 0x505449
mov eax, 0
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
add esp, 0xb4
ret 8