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

Disassembly:
sub esp, 0x30
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
push esi
mov esi, ecx
mov ecx, dword [esi + 0x54]
push edi
mov edi, dword [esp + 0x48]
sub ecx, 0xffffff80
mov dword [esi + 0x8c], ebp
mov dword [esi + 0x90], edi
mov eax, dword [ecx]
test eax, eax
je 0x404d62
push eax
call fcn.00415b50
test eax, eax
je 0x404d62
mov eax, dword [esi + 0x54]
mov eax, dword [eax + 0x80]
push 0x2050
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
jmp 0x404d64
xor eax, eax
mov dword [esi + 0x80], eax
test eax, eax
je 0x404daf
push eax
mov ecx, edi
call fcn.004154d0
mov edx, dword [edi + 0x20]
lea ecx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x74], 0
jg 0x404d99
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x30]
mov dword [eax + 0x74], ecx
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x78], 0
jg 0x404dcf
mov edx, dword [esp + 0x3c]
sub edx, dword [esp + 0x34]
mov dword [eax + 0x78], edx
jmp 0x404dcf
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x74], 0
jg 0x404dbf
mov dword [eax + 0x74], 0x140
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x78], 0
jg 0x404dcf
mov dword [eax + 0x78], 0xc8
mov eax, dword [esi + 0x54]
cmp dword [eax + 0xa8], 0
je 0x404dfb
push 0x20
push 0
push 0xc40080
mov ecx, ebp
call fcn.00427c53
push 0x20
push 0
push 0x301
mov ecx, ebp
call fcn.00427c7f
mov edx, dword [ebp + 0x20]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [ebp + 0x20]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esi + 0x54]
cmp dword [eax + 0xac], 0
je 0x404e7d
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call ebx
push 1
mov edi, eax
call ebx
push 0x314
mov ebx, eax
push ebx
push edi
push 0
push 0
push 0
mov ecx, ebp
call fcn.00427fdc
mov edx, dword [esp + 0x18]
sub edx, dword [esp + 0x10]
mov eax, dword [esi + 0x54]
sub edx, dword [esp + 0x28]
add edx, dword [esp + 0x20]
add edx, edi
mov dword [eax + 0x74], edx
mov ecx, dword [esp + 0x1c]
sub ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x54]
sub ecx, dword [esp + 0x2c]
add ecx, dword [esp + 0x24]
add ecx, ebx
mov dword [edx + 0x78], ecx
jmp 0x404eb7
mov ecx, dword [eax + 0x78]
sub ecx, dword [esp + 0x1c]
mov edx, dword [eax + 0x74]
sub edx, dword [esp + 0x18]
sub ecx, dword [esp + 0x24]
sub edx, dword [esp + 0x20]
add ecx, dword [esp + 0x14]
add edx, dword [esp + 0x10]
add ecx, dword [esp + 0x2c]
add edx, dword [esp + 0x28]
push 0x116
push ecx
push edx
push 0
push 0
push 0
mov ecx, ebp
call fcn.00427fdc
mov ecx, dword [esi + 0x54]
cmp dword [ecx + 0x130], 0
jge 0x404ee0
mov eax, dword [ecx + 0x74]
lea edx, [eax + eax*4]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ecx + 0x130], eax
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x134], 0
jge 0x404ef8
mov ecx, dword [eax + 0x130]
mov dword [eax + 0x134], ecx
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x138], 0
jg 0x404f17
mov edx, dword [eax + 0x130]
mov ecx, dword [eax + 0x74]
add edx, edx
sub ecx, edx
mov dword [eax + 0x138], ecx
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x13c], 0
jg 0x404f38
mov edx, dword [eax + 0x134]
mov ecx, dword [eax + 0x78]
add edx, edx
add edx, edx
sub ecx, edx
mov dword [eax + 0x13c], ecx
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x140], 0
jge 0x404f50
mov edx, dword [eax + 0x130]
mov dword [eax + 0x140], edx
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x144], 0
jge 0x404f6f
mov ecx, dword [eax + 0x134]
mov edx, dword [eax + 0x78]
add ecx, ecx
sub edx, ecx
mov dword [eax + 0x144], edx
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x148], 0
jg 0x404f87
mov ecx, dword [eax + 0x138]
mov dword [eax + 0x148], ecx
mov eax, dword [esi + 0x54]
cmp dword [eax + 0x14c], 0
jg 0x404f9f
mov edx, dword [eax + 0x134]
mov dword [eax + 0x14c], edx
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x140]
mov dword [esi + 0x70], ecx
mov edx, dword [eax + 0x144]
mov dword [esi + 0x74], edx
mov ecx, dword [eax + 0x148]
mov edx, dword [esi + 0x70]
lea ecx, [ecx + edx - 1]
mov dword [esi + 0x78], ecx
mov edx, dword [eax + 0x14c]
mov ecx, dword [esi + 0x74]
lea edx, [edx + ecx - 1]
lea ecx, [eax + 0x150]
mov dword [esi + 0x7c], edx
mov eax, dword [ecx]
test eax, eax
je 0x404fe8
push eax
call fcn.00415b50
jmp 0x404fea
xor eax, eax
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [esi + 0xac], eax
jne 0x40504f
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x1b8]
add eax, 0x1b0
test ecx, ecx
jle 0x405020
add ecx, 0xffffffff
jne 0x405016
mov edi, dword [eax + 4]
jmp 0x405022
mov edi, dword [eax]
jmp 0x405022
xor edi, edi
test edi, edi
je 0x40504f
mov eax, dword [edi + 8]
test eax, eax
je 0x40504f
lea ecx, [eax + 8]
mov eax, dword [ecx]
test eax, eax
je 0x405040
push eax
call fcn.00415b50
test eax, eax
jne 0x405045
mov edi, dword [edi + 4]
jmp 0x405022
mov dword [esi + 0xac], 1
mov eax, dword [esi + 0x54]
mov edx, dword [eax + 0x158]
mov ecx, dword [eax + 0x174]
push edx
movzx edx, byte [eax + 0x170]
push 0
push 0
push 0
push 0
push ecx
movzx ecx, byte [eax + 0x16c]
push 0
push edx
mov edx, dword [eax + 0x168]
push ecx
mov ecx, dword [eax + 0x164]
push edx
mov edx, dword [eax + 0x160]
push 0
push 0
push ecx
push edx
lea ebx, [esi + 0x58]
call fcn.004046a0
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x158]
cmp dword [eax + 0x170], 0
mov edx, dword [eax + 0x174]
push ecx
push 0
push 0
push 0
push 0
push edx
push 0
sete cl
movzx edx, cl
movzx ecx, byte [eax + 0x16c]
push edx
mov edx, dword [eax + 0x168]
push ecx
mov ecx, dword [eax + 0x164]
push edx
mov edx, dword [eax + 0x160]
push 0
push 0
push ecx
push edx
lea ebx, [esi + 0x68]
call fcn.004046a0
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x188]
mov edx, dword [eax + 0x1a4]
add esp, 0x70
push ecx
movzx ecx, byte [eax + 0x1a0]
push 0
push 0
push 0
push 0
push edx
movzx edx, byte [eax + 0x19c]
push 0
push ecx
mov ecx, dword [eax + 0x198]
push edx
mov edx, dword [eax + 0x194]
mov eax, dword [eax + 0x190]
push ecx
push 0
push 0
push edx
push eax
lea ebx, [esi + 0x60]
call fcn.004046a0
mov ecx, dword [esi + 0x54]
mov edx, dword [ecx + 0x64]
add esp, 0x38
push edx
mov ecx, ebp
call fcn.00427cab
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x78]
mov edx, dword [eax + 0x74]
push 0x116
push ecx
push edx
push 0
push 0
push 0
mov ecx, esi
call fcn.00427fdc
cmp dword [esi + 0x80], 0
je 0x4051e0
mov ecx, dword [esp + 0x48]
mov edx, dword [ecx + 0x20]
lea eax, [esp + 0x30]
push eax
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov edi, dword [esp + 0x38]
mov eax, dword [esi + 0x54]
sub edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x3c]
mov ebx, dword [eax + 0x74]
sub ecx, dword [esp + 0x34]
cmp ebx, edi
jg 0x4051a5
cmp dword [eax + 0x78], ecx
jle 0x4051e0
mov eax, dword [eax + 0x78]
cmp eax, ecx
jle 0x4051b7
sub eax, ecx
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
jmp 0x4051b9
xor ecx, ecx
cmp ebx, edi
jle 0x4051c8
mov eax, ebx
sub eax, edi
cdq
sub eax, edx
sar eax, 1
jmp 0x4051ca
xor eax, eax
push 0x115
push 0
push 0
push ecx
mov ecx, dword [esp + 0x58]
push eax
push 0
call fcn.00427fdc
mov ecx, dword [esi + 0x54]
mov eax, dword [ecx + 0x88]
add ecx, 0x88
test eax, eax
je 0x405215
push eax
call fcn.00415b50
test eax, eax
je 0x405215
mov eax, dword [esi + 0x54]
mov eax, dword [eax + 0x88]
push eax
call fcn.00404320
add esp, 4
mov dword [esi + 0x94], eax
mov ecx, dword [esi + 0x54]
mov eax, dword [ecx + 0x98]
add ecx, 0x98
test eax, eax
je 0x40524a
push eax
call fcn.00415b50
test eax, eax
je 0x40524a
mov ecx, dword [esi + 0x54]
mov eax, dword [ecx + 0x98]
push eax
call fcn.00404320
add esp, 4
mov dword [esi + 0x98], eax
mov ecx, dword [esi + 0x54]
mov eax, dword [ecx + 0xa0]
add ecx, 0xa0
test eax, eax
je 0x40527f
push eax
call fcn.00415b50
test eax, eax
je 0x40527f
mov edx, dword [esi + 0x54]
mov eax, dword [edx + 0xa0]
push eax
call fcn.00404320
add esp, 4
mov dword [esi + 0x9c], eax
mov ecx, dword [esi + 0x54]
mov eax, dword [ecx + 0x90]
add ecx, 0x90
test eax, eax
je 0x4052b4
push eax
call fcn.00415b50
test eax, eax
je 0x4052b4
mov eax, dword [esi + 0x54]
mov eax, dword [eax + 0x90]
push eax
call fcn.00404320
add esp, 4
mov dword [esi + 0xa0], eax
mov ecx, dword [esi + 0x54]
mov edx, dword [ecx + 0x1b8]
cmp edx, 1
jle 0x4052e3
mov edi, dword [ecx + 0x160]
mov eax, dword [ecx + 0x13c]
mov ebx, edx
imul ebx, edi
sub eax, ebx
lea ebx, [edx - 1]
cdq
idiv ebx
add eax, edi
mov dword [esi + 0x88], eax
mov eax, dword [ecx + 0x6c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 8