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

Disassembly:
push 0xffffffffffffffff
push 0x52c500
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push ebp
push edi
mov eax, dword [0x578700]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
test esi, esi
je 0x4051f7
mov eax, dword [esi]
mov edx, dword [eax + 0x30]
push 0xff
mov ecx, esi
call edx
push 2
mov ecx, esi
mov dword [esp + 0x38], eax
call fcn.0040fbdf
mov eax, dword [esi]
mov edx, dword [eax + 0x2c]
push 0xffffff
mov ecx, esi
call edx
mov ebp, dword [esp + 0x88]
mov edx, dword [ebp + 0x210]
mov dword [esp + 0x30], eax
xor eax, eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x20], eax
test edx, edx
jle 0x4051db
test eax, eax
jl 0x405334
cmp eax, dword [ebp + 0x210]
jge 0x405334
mov ecx, dword [ebp + 0x20c]
mov ebx, dword [ecx + eax*4]
lea ecx, [ecx + eax*4]
test ebx, ebx
je 0x4051ce
cmp dword [ebx], 0
jl 0x4051ce
cmp dword [ebx + 4], 0
jl 0x4051ce
mov edi, dword [ebx + 0x18]
xor edx, edx
mov dword [esp + 0x24], edi
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], vtable.CPen.0
mov dword [esp + 0x80], edx
mov eax, dword [ebx + 8]
mov ecx, dword [ebp + 0x1c4]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_CreatePen]
push eax
lea ecx, [esp + 0x44]
call fcn.00410917
lea edx, [esp + 0x40]
push edx
mov ecx, esi
call fcn.00410a52
cmp edi, 1
mov dword [esp + 0x28], eax
jle 0x40519e
cmp dword [esp + 0x8c], 0
jne 0x40520c
lea eax, [edi - 2]
test eax, eax
jl 0x405334
cmp eax, dword [ebx + 0x18]
jge 0x405334
mov ecx, dword [ebx + 0x14]
mov edx, dword [ecx + eax*8 + 4]
lea eax, [ecx + eax*8]
mov ecx, dword [eax]
lea eax, [edi - 1]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
test eax, eax
jl 0x405334
cmp eax, dword [ebx + 0x18]
jge 0x405334
mov edi, dword [ebx + 0x14]
mov ebp, dword [edi + eax*8 + 4]
lea eax, [edi + eax*8]
mov edi, dword [eax]
mov eax, dword [esp + 0x88]
cmp dword [eax + 0x1cc], 1
jne 0x40510e
lea ecx, [esp + 0x18]
call fcn.00401140
mov byte [esp + 0x80], 1
mov ecx, dword [ebx]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [ebx + 4]
push ebp
push edi
push edx
push eax
push ecx
lea edx, [esp + 0x30]
push str.index_02d_x1_06d_y1_06d_x2_06d_y2_06d_id_02d
push edx
call fcn.004013f0
mov ebx, dword [ebx + 4]
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx - 0xc]
add esp, 0x20
mov eax, ebx
shl eax, 4
push edx
sub eax, ebx
mov ebx, dword [esi]
mov edx, dword [ebx + 0x5c]
push ecx
lea eax, [eax + eax + 0xa]
push eax
push 0xa
mov ecx, esi
call edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x80], 0
call fcn.00401170
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
cmp ecx, 0xffff0002
jne 0x40511a
cmp edx, ecx
je 0x405197
cmp edi, 0xffff0002
jne 0x405126
cmp ebp, edi
je 0x405197
push edx
push ecx
lea eax, [esp + 0x50]
push eax
mov ecx, esi
call fcn.00410365
push ebp
push edi
mov ecx, esi
call fcn.0040fd7d
mov ecx, dword [esp + 0x88]
cmp dword [ecx + 0x1c8], 1
jne 0x405197
mov edx, ecx
mov eax, dword [edx + 0x1c4]
lea ecx, [eax + ebp + 1]
lea edx, [eax + edi + 1]
push 0x646464
sub ebp, eax
sub edi, eax
push 0x646464
lea eax, [esp + 0x60]
mov dword [esp + 0x6c], ecx
dec ebp
dec edi
push eax
mov ecx, esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], edx
call fcn.0041b057
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push 0xffffff
mov ecx, esi
call eax
mov ebp, dword [esp + 0x88]
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, esi
call fcn.00410a52
mov dword [esp + 0x80], 0xffffffff
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], vtable.CPen.0
call fcn.00401410
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
inc eax
cmp eax, edx
mov dword [esp + 0x20], eax
jl 0x404faa
mov edx, dword [esi]
mov eax, dword [esp + 0x30]
mov edx, dword [edx + 0x2c]
push eax
mov ecx, esi
call edx
mov ecx, dword [esp + 0x34]
mov eax, dword [esi]
mov edx, dword [eax + 0x30]
push ecx
mov ecx, esi
call edx
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x74
ret 8
cmp dword [ebp + 0x1d0], 0
jg 0x405326
cmp dword [ebp + 0x1d4], 0
jg 0x405326
cmp dword [ebp + 0x1d8], 0
jg 0x405326
cmp dword [ebx + 0x18], 0
jle 0x405334
xor ecx, ecx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x14], ecx
test edi, edi
jle 0x40519e
test ecx, ecx
jl 0x405334
cmp ecx, dword [ebx + 0x18]
jge 0x405334
mov edx, dword [ebx + 0x14]
mov edi, dword [edx + ecx*8]
mov ebp, dword [edx + ecx*8 + 4]
lea eax, [edx + ecx*8]
cmp edi, 0xffff0002
jne 0x40528a
cmp ebp, edi
jne 0x40528a
mov dword [esp + 0x1c], 1
jmp 0x405312
cmp dword [esp + 0x1c], 1
jne 0x4052ad
mov ecx, ebp
push ecx
mov edx, edi
push edx
lea eax, [esp + 0x58]
push eax
mov ecx, esi
call fcn.004069b0
mov dword [esp + 0x1c], 0
jmp 0x40530e
push ebp
push edi
mov ecx, esi
call fcn.0040fd7d
mov eax, dword [esp + 0x88]
cmp dword [eax + 0x1c8], 1
jne 0x40530e
mov eax, dword [eax + 0x1c4]
lea ecx, [eax + ebp + 1]
lea edx, [eax + edi + 1]
push 0x646464
mov dword [esp + 0x78], ecx
sub ebp, eax
sub edi, eax
push 0x646464
lea ecx, [esp + 0x70]
push ecx
dec ebp
dec edi
mov ecx, esi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], ebp
mov dword [esp + 0x7c], edx
call fcn.0041b057
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push 0xffffff
mov ecx, esi
call eax
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, dword [esp + 0x24]
mov dword [esp + 0x14], ecx
jl 0x405253
jmp 0x405197
push ebx
push ebp
mov eax, esi
call fcn.00404e60
jmp 0x40519e
call fcn.00411d36
int3