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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x57e0b0
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x5e14a4]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x5e14a4]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x14]
test dword [ebx + 0x14], 0x4000
mov esi, dword [ebp + 8]
mov al, byte [ebp + 0x18]
mov dword [esp + 0x24], esi
mov byte [esp + 0x18], al
jne 0x4090e3
movzx eax, byte [ebp + 0x1c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [ebp + 0x10]
push ebx
push eax
mov eax, dword [ebp + 0xc]
push eax
push esi
call edx
mov eax, esi
jmp 0x409280
lea eax, [esp + 0x20]
push eax
mov ecx, ebx
call fcn.0040bbe0
mov edi, eax
mov dword [esp + 0x78], 0
call fcn.0040ad10
mov dword [esp + 0x78], 0xffffffff
mov edi, dword [esp + 0x20]
mov dword [esp + 0x14], eax
test edi, edi
je 0x40914d
push 0
lea ecx, [esp + 0x2c]
call fcn.0056aa2e
mov eax, dword [edi + 4]
test eax, eax
je 0x40912d
cmp eax, 0xffffffff
jae 0x40912d
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
lea ecx, [esp + 0x28]
not esi
call fcn.0056aa56
and esi, edi
je 0x40914d
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], 0
mov byte [esp + 0x30], 0
cmp byte [ebp + 0x1c], 0
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x78], 1
lea esi, [esp + 0x4c]
je 0x4091a0
call fcn.0040a3e0
mov edi, eax
lea esi, [esp + 0x30]
mov byte [esp + 0x78], 2
call fcn.0040ba00
mov byte [esp + 0x78], 1
cmp dword [esp + 0x60], 0x10
jb 0x4091ce
mov ecx, dword [esp + 0x4c]
push ecx
jmp 0x4091c6
call fcn.0040a3c0
mov edi, eax
lea esi, [esp + 0x30]
mov byte [esp + 0x78], 3
call fcn.0040ba00
mov byte [esp + 0x78], 1
cmp dword [esp + 0x60], 0x10
jb 0x4091ce
mov edx, dword [esp + 0x4c]
push edx
call fcn.00411694
add esp, 4
cmp dword [ebx + 0x24], 0
mov edi, dword [ebx + 0x20]
mov ecx, dword [esp + 0x40]
jl 0x4091e9
jg 0x4091e1
test edi, edi
je 0x4091e9
cmp edi, ecx
jbe 0x4091e9
sub edi, ecx
jmp 0x4091eb
xor edi, edi
mov eax, dword [ebx + 0x14]
mov esi, dword [esp + 0x18]
and eax, 0x1c0
cmp eax, 0x40
je 0x409224
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push esi
push ecx
mov eax, edi
push edx
lea edi, [esp + 0x34]
call fcn.0040a350
mov ecx, dword [eax]
mov dword [ebp + 0xc], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x4c]
add esp, 0xc
mov dword [ebp + 0x10], edx
xor edi, edi
cmp dword [esp + 0x44], 0x10
mov eax, dword [esp + 0x30]
jae 0x409233
lea eax, [esp + 0x30]
mov edx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x10]
push ecx
push edx
lea ecx, [esp + 0x24]
push ecx
call fcn.0040a2e0
mov ecx, dword [eax]
mov dword [ebp + 0xc], ecx
mov eax, dword [eax + 4]
push esi
push eax
mov dword [ebp + 0x10], eax
xor edx, edx
mov eax, edi
mov edi, dword [esp + 0x3c]
push ecx
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x24], edx
call fcn.0040a350
add esp, 0x1c
cmp dword [esp + 0x44], 0x10
jb 0x40927e
mov edx, dword [esp + 0x30]
push edx
call fcn.00411694
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.0054df46
mov esp, ebp
pop ebp
ret 0x18