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

Disassembly:
push 0xffffffffffffffff
push 0x500a40
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x30]
call fcn.004ce0e0
call fcn.004cd840
xor esi, esi
push 0x400
mov dword [esp + 0x78], esi
call fcn.004db904
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], eax
add eax, 0x400
add esp, 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x68], esi
mov bl, byte [esp + 0x84]
mov dword [esp + 0x74], 1
test bl, 1
mov eax, 0x4107
jne 0x4591b2
mov eax, 0x6107
push eax
mov eax, dword [esp + 0x80]
lea ecx, [esp + 0x34]
push eax
push ecx
call fcn.0045a240
add esp, 0xc
test eax, eax
jne 0x459218
mov eax, dword [esp + 0x68]
mov dword [esp + 0x74], 3
cmp eax, esi
je 0x4591ed
push ecx
mov dword [esp + 0x84], esp
push eax
call fcn.00406d40
add esp, 8
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
sub eax, edx
lea ecx, [esp + 0x3c]
push eax
mov byte [esp + 0x78], 2
call fcn.00419520
mov dword [esp + 0x74], 0xffffffff
call fcn.004cdc60
jmp 0x45962c
test bl, 0x10
je 0x45942e
mov eax, dword [esp + 0x90]
mov dword [esp + 0x28], esi
cmp eax, esi
mov dword [esp + 0x2c], esi
je 0x459241
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov esi, dword [esp + 0x80]
mov eax, dword [esp + 0x2c]
mov edi, dword [esi + 4]
cmp edi, eax
mov dword [esp + 0x10], edi
jl 0x45936a
cmp edi, dword [esi + 4]
jne 0x459264
mov eax, dword [esi]
jmp 0x459270
mov edx, dword [ebp]
push edi
mov ecx, ebp
call dword [edx + 0x150]
mov dword [esp + 0x90], eax
mov eax, dword [ebp]
push edi
mov ecx, ebp
call dword [eax + 0x158]
test eax, eax
mov dword [esp + 0x18], eax
je 0x459359
mov ecx, dword [esp + 0x90]
test ecx, ecx
jle 0x459359
mov ecx, dword [esp + 0x2c]
xor esi, esi
xor ebx, ebx
cmp edi, ecx
jne 0x4592b8
mov ebx, dword [esp + 0x28]
jmp 0x4592b8
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
test ch, 8
jne 0x45934a
mov edx, dword [esp + 0x90]
push ecx
lea ecx, [esp + 0x34]
push 0
push ecx
lea ecx, [eax + edx*2]
lea edx, [eax + ebx*2]
lea edi, [ebp + 0x26c]
push ecx
push edx
push edi
lea ecx, [esp + 0x38]
call fcn.00460b80
mov eax, dword [eax]
push eax
call fcn.00463600
add esp, 0x18
test eax, eax
setne al
test al, al
je 0x459346
mov eax, dword [edi]
mov ecx, dword [edi]
add eax, 0x14
add ecx, 8
mov esi, dword [eax]
mov edx, dword [ecx + 4]
mov ecx, dword [esp + 0x8c]
sub esi, edx
mov edx, dword [esp + 0x10]
mov dword [ecx + 4], edx
mov edi, dword [edi]
add edi, 8
sar esi, 1
mov eax, dword [edi + 4]
mov edi, dword [esp + 0x18]
sub eax, edi
sar eax, 1
mov dword [ecx], eax
add eax, esi
add ebx, eax
mov eax, dword [esp + 0x90]
cmp ebx, eax
jl 0x4592b0
mov edi, dword [esp + 0x10]
test esi, esi
jne 0x459403
mov esi, dword [esp + 0x80]
mov eax, dword [esp + 0x2c]
dec edi
cmp edi, eax
mov dword [esp + 0x10], edi
jge 0x45925b
mov eax, dword [esp + 0x88]
test eax, eax
je 0x45961b
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov eax, dword [ebp]
mov dword [esp + 0x28], ecx
mov ecx, ebp
mov dword [esp + 0x2c], edx
call dword [eax + 0x138]
mov edx, dword [ebp]
mov ebx, eax
mov eax, dword [esi + 4]
mov ecx, ebp
push eax
dec ebx
call dword [edx + 0x150]
mov edx, dword [esp + 0x8c]
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x84]
push ecx
push edx
mov edx, dword [esp + 0x84]
push 0
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
mov ecx, ebp
mov dword [esp + 0x3c], ebx
call fcn.00459140
mov esi, eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x74], 7
test eax, eax
je 0x4593f9
push ecx
mov dword [esp + 0x84], esp
push eax
call fcn.00406d40
add esp, 8
mov byte [esp + 0x74], 6
jmp 0x4595f6
mov eax, dword [esp + 0x68]
mov dword [esp + 0x74], 5
test eax, eax
je 0x459424
push ecx
mov dword [esp + 0x84], esp
push eax
call fcn.00406d40
add esp, 8
mov byte [esp + 0x74], 4
jmp 0x4595f6
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x138]
dec eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x90]
cmp eax, esi
je 0x45945a
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [eax + 4]
cmp ebx, ecx
jg 0x459508
jmp 0x45947b
mov eax, dword [esp + 0x80]
xor esi, esi
cmp ebx, dword [eax + 4]
jne 0x459482
mov esi, dword [eax]
mov eax, dword [ebp]
push ebx
mov ecx, ebp
call dword [eax + 0x158]
mov edx, dword [ebp]
push ebx
mov ecx, ebp
mov edi, eax
call dword [edx + 0x150]
cmp ebx, dword [esp + 0x2c]
jne 0x4594a6
mov eax, dword [esp + 0x28]
cmp esi, eax
jge 0x4594f2
test edi, edi
je 0x4594f2
mov ecx, dword [esp + 0x30]
test ch, 8
jne 0x4594f2
push ecx
lea ecx, [esp + 0x34]
push 0
lea edx, [edi + eax*2]
push ecx
lea eax, [edi + esi*2]
push edx
lea ecx, [ebp + 0x26c]
push eax
push ecx
lea ecx, [esp + 0xa8]
call fcn.00460b80
mov edx, dword [eax]
push edx
call fcn.00463600
add esp, 0x18
test eax, eax
setne al
test al, al
jne 0x459599
mov eax, dword [esp + 0x2c]
inc ebx
cmp ebx, eax
jle 0x459472
mov eax, dword [esp + 0x80]
xor esi, esi
cmp dword [esp + 0x88], esi
je 0x45961b
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x8c]
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x84]
push eax
push ecx
mov ecx, dword [esp + 0x84]
push esi
lea eax, [esp + 0x1c]
push edx
push eax
push ecx
mov ecx, ebp
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
call fcn.00459140
mov edi, eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x74], 0xb
cmp eax, esi
je 0x459577
push ecx
mov dword [esp + 0x84], esp
push eax
call fcn.00406d40
add esp, 8
lea ecx, [esp + 0x3c]
mov byte [esp + 0x74], 0xa
call fcn.00406d20
mov dword [esp + 0x74], 0xffffffff
call fcn.004cdc60
mov eax, edi
jmp 0x45962e
mov eax, dword [ebp + 0x26c]
mov ecx, dword [ebp + 0x26c]
add eax, 0x14
add ecx, 8
mov esi, dword [eax]
mov eax, dword [ecx + 4]
sub esi, eax
mov eax, dword [esp + 0x8c]
sar esi, 1
mov dword [eax + 4], ebx
mov ebp, dword [ebp + 0x26c]
add ebp, 8
mov ecx, dword [ebp + 4]
sub ecx, edi
sar ecx, 1
mov dword [eax], ecx
mov eax, dword [esp + 0x68]
mov dword [esp + 0x74], 9
test eax, eax
je 0x4595f1
push ecx
mov dword [esp + 0x84], esp
push eax
call fcn.00406d40
add esp, 8
mov byte [esp + 0x74], 8
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
sub eax, edx
lea ecx, [esp + 0x3c]
push eax
call fcn.00419520
mov dword [esp + 0x74], 0xffffffff
call fcn.004cdc60
mov eax, esi
jmp 0x45962e
lea ecx, [esp + 0x30]
mov dword [esp + 0x74], 0xffffffff
call fcn.00406cb0
xor eax, eax
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x68
ret 0x18