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

Disassembly:
sub esp, 0xf8
mov eax, dword [0x5b7a9c]
xor eax, esp
mov dword [esp + 0xf4], eax
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x70]
mov ecx, dword [esi + 0x74]
push edi
push eax
push ecx
mov ecx, dword [esi + 0xa0]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.00473d30
mov ecx, dword [esp + 0x10]
test ecx, ecx
jle 0x4917f8
mov eax, dword [esi + 0x160]
cdq
idiv dword [0x5c3df4]
add eax, dword [esi + 0x7c]
cmp ecx, eax
jle 0x4917f8
dec ecx
mov dword [esp + 0x10], ecx
push ecx
mov ecx, dword [esi + 0xa0]
call fcn.0048b9e0
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x74]
mov edi, dword [esi + 0x78]
lea ecx, [eax + 1]
mov dword [esp + 0x18], ecx
mov ecx, dword [esi + 0xa0]
lea edx, [eax + eax*8]
mov eax, dword [ecx + 0x31c]
mov eax, dword [eax + edx*4 + 8]
mov ecx, dword [ecx + 0x10c]
mov edx, dword [esi + 0x70]
push ecx
push edx
push eax
call fcn.00485940
lea ebp, [eax + edi + 1]
mov eax, dword [esi + 0x19c]
add esp, 0xc
or ebx, 0xffffffff
mov dword [esp + 0x14], ebp
cmp eax, dword [esp + 0x10]
jne 0x491847
mov dword [esp + 0x18], ebx
cmp dword [esi + 0x198], ebp
jne 0x49185d
cmp dword [esi + 0x1a0], edi
jne 0x49185d
mov dword [esp + 0x14], ebx
mov ebp, ebx
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
jne 0x491869
cmp ebp, ebx
je 0x491886
mov eax, dword [esi + 0x74]
mov edi, dword [esi + 0x70]
lea edx, [eax + eax*8]
mov eax, dword [esi + 0xa0]
mov eax, dword [eax + 0x31c]
mov edx, dword [eax + edx*4 + 8]
movzx ebx, word [edx + edi*2]
cmp dword [esi + 0x128], 0
je 0x491a04
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
test ecx, ecx
jl 0x4918eb
call fcn.0050ad42
mov eax, dword [eax + 0xc]
push 0x64
lea ecx, [esp + 0xa4]
push ecx
push 0x53c8
push eax
call edi
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401330
mov ecx, dword [0x5ed04c]
add esp, 0xc
push 1
lea edx, [esp + 0x40]
push edx
push 1
add ecx, 0xec
call fcn.0051aa33
test ebp, ebp
jl 0x491939
call fcn.0050ad42
mov eax, dword [eax + 0xc]
push 0x64
lea ecx, [esp + 0xa4]
push ecx
push 0x5ba1
push eax
call edi
push ebp
lea edx, [esp + 0xa4]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00401330
add esp, 0xc
push 1
lea ecx, [esp + 0x40]
push ecx
mov ecx, dword [0x5ed04c]
push 2
add ecx, 0xec
call fcn.0051aa33
test ebx, ebx
jl 0x49197e
mov dword [0x5ed0a4], ebx
mov eax, str._04X
test ebx, 0xff00
jne 0x491955
mov eax, 0x579e14
push ebx
push eax
lea edx, [esp + 0x44]
push edx
call fcn.00401330
mov ecx, dword [0x5ed04c]
add esp, 0xc
push 1
lea eax, [esp + 0x40]
push eax
push 4
add ecx, 0xec
call fcn.0051aa33
cmp dword [0x5ed6bc], 0
je 0x491a04
mov eax, dword [esi + 0xa0]
mov ecx, dword [eax + 0x154]
cmp ecx, dword [0x5ed0a0]
je 0x491a04
mov edx, 9
mov word [esp + 0x3e], dx
mov ecx, edx
push 0x30
lea edx, [esp + 0x44]
mov word [esp + 0x40], cx
mov eax, dword [eax + 0x154]
push edx
push eax
call fcn.0044f700
mov eax, dword [0x5ba2a8]
add esp, 0xc
xor edx, edx
cmp dword [eax + 0xc4], 0x3b5
push 1
sete dl
lea ecx, [esp + 0x40]
push ecx
mov ecx, dword [0x5ed04c]
add ecx, 0xec
add edx, 0xa
push edx
call fcn.0051aa33
mov ecx, dword [esi + 0xa0]
mov edx, dword [ecx + 0x154]
mov dword [0x5ed0a0], edx
mov eax, dword [esi + 0x19c]
xor edi, edi
cmp eax, dword [esp + 0x10]
je 0x491a17
mov edi, 1
mov ecx, dword [esi + 0xa0]
cmp dword [ecx + 0x9c], 0
je 0x491a2e
mov edx, dword [ecx + 0x2e8]
jmp 0x491a4b
cmp dword [ecx + 0x78], 0
jne 0x491a45
cmp dword [ecx + 0x84], 0
jne 0x491a45
mov edx, dword [ecx + 0x2d0]
jmp 0x491a4b
mov edx, dword [ecx + 0x16c]
dec edx
cmp eax, edx
jl 0x491a81
cmp dword [ecx + 0x9c], 0
je 0x491a61
mov ecx, dword [ecx + 0x2e8]
jmp 0x491a7e
cmp dword [ecx + 0x78], 0
jne 0x491a78
cmp dword [ecx + 0x84], 0
jne 0x491a78
mov ecx, dword [ecx + 0x2d0]
jmp 0x491a7e
mov ecx, dword [ecx + 0x16c]
lea eax, [ecx - 1]
mov dword [esi + 0x19c], eax
test edi, edi
je 0x491c4c
mov ecx, dword [esi + 0x7c]
mov edx, dword [0x5c3df4]
mov edi, dword [esp + 0x10]
mov ebp, dword [esi + 0x164]
sub eax, ecx
imul eax, edx
sub edi, ecx
imul edi, edx
cmp dword [0x5ed7b4], 0
mov ebx, eax
je 0x491b00
cmp dword [esi + 0x1f8], 0
jne 0x491ac9
cmp dword [esi + 0x1fc], 0
je 0x491ada
push 0
push 1
mov ecx, esi
call fcn.0048dd30
mov edx, dword [0x5c3df4]
add edx, ebx
push edx
push ebp
push ebx
push 0
mov ecx, esi
call fcn.0048faf0
mov eax, dword [0x5c3df4]
add eax, edi
push eax
push ebp
push edi
push 0
mov ecx, esi
call fcn.0048faf0
jmp 0x491c48
cmp dword [esi + 0x128], 0
je 0x491c48
mov ecx, dword [esi + 0x20]
push ecx
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [esi + 0x68]
mov ebp, eax
mov eax, dword [0x5ed7dc]
cdq
sub eax, edx
add ebx, ecx
add edi, ecx
sar eax, 1
mov edx, 0
sets dl
dec edx
and edx, eax
cmp ebx, ecx
mov dword [esp + 0x1c], edx
jl 0x491bf3
mov edx, dword [0x5ba128]
mov eax, dword [0x5c3df4]
mov ecx, dword [0x5ed0cc]
push edx
add eax, ebx
push ebp
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.GDI32.dll_SetBkColor]
push 0
push 0
push 0
lea eax, [esp + 0x34]
push eax
push 2
push 0
push 0
push ebp
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov ecx, dword [0x5ba118]
push ecx
push ebp
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [esi + 0x19c]
mov ecx, dword [esi + 0xa0]
push edx
call fcn.00471ec0
test eax, eax
jne 0x491bf3
push eax
mov eax, dword [esi + 0x19c]
push eax
lea ecx, [esp + 0x40]
push ecx
mov ecx, dword [esi + 0xa0]
lea edx, [esp + 0x30]
push edx
call fcn.004745a0
mov eax, dword [esp + 0x24]
mov ecx, dword [esi + 0xa0]
lea edx, [eax + eax*8]
mov eax, dword [ecx + 0x31c]
cmp dword [eax + edx*4 + 0x14], 0
je 0x491bf3
mov ecx, dword [esp + 0x1c]
add ecx, ebx
push ecx
push ebp
call fcn.0040d1d0
add esp, 8
cmp edi, dword [esi + 0x68]
jl 0x491c3d
mov eax, dword [esi + 0x74]
mov ecx, dword [esi + 0xa0]
lea edx, [eax + eax*8]
mov eax, dword [ecx + 0x31c]
cmp dword [eax + edx*4 + 0x14], 0
je 0x491c26
mov edx, dword [esp + 0x10]
push edx
call fcn.00471ec0
test eax, eax
jne 0x491c26
mov eax, 1
jmp 0x491c28
xor eax, eax
push eax
mov eax, dword [esp + 0x20]
add eax, edi
push eax
push 0
push ebp
mov ecx, 0x5ba238
call fcn.0040d500
mov ecx, dword [esi + 0x20]
push ebp
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 0x78]
mov dword [esi + 0x19c], edx
mov dword [esi + 0x198], ebp
mov dword [esi + 0x1a0], eax
cmp dword [0x5ed7bc], 0
je 0x491cbc
mov ecx, dword [esi + 0x70]
mov edx, dword [esi + 0x74]
push 1
push 1
push ecx
push edx
mov ecx, esi
call fcn.0048bb40
mov edi, eax
add edi, dword [esi + 0x78]
mov eax, dword [esi + 0x90]
cmp edi, eax
je 0x491cbc
cmp dword [esi + 0x128], 0
je 0x491ca3
push 0
push eax
mov ecx, esi
call fcn.00487800
cmp dword [esi + 0x128], 0
mov dword [esi + 0x90], edi
je 0x491cbc
push 1
push edi
mov ecx, esi
call fcn.00487800
cmp dword [esp + 0x18], 0
jge 0x491cc7
test ebp, ebp
jl 0x491cd2
push 0
push 0
mov ecx, esi
call fcn.0048dd30
mov ecx, dword [esp + 0x104]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0053fa67
add esp, 0xf8
ret