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

Disassembly:
mov eax, 0x106c
call fcn.004261b0
mov eax, dword [esp + 0x107c]
push ebp
mov ebp, dword [esp + 0x1074]
push esi
xor esi, esi
cmp eax, esi
mov ecx, 1
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp + 0x10], ebp
jne 0x4095bd
mov eax, dword [esp + 0x1080]
cmp eax, esi
je 0x4095b2
mov dword [eax], 0x63
pop esi
xor eax, eax
pop ebp
add esp, 0x106c
ret
mov dword [eax], esi
mov eax, dword [esp + 0x1080]
cmp eax, esi
je 0x4095cc
mov dword [eax], esi
mov eax, dword [esp + 0x1088]
cmp eax, esi
push ebx
push edi
jne 0x4095e3
mov eax, 0x10
jmp 0x409999
mov edi, dword [esp + 0x1084]
test edi, 0x800
mov dword [eax], esi
je 0x409623
test edi, 0x2000
jne 0x409623
push 0xffffffffffffffff
push ebp
call fcn.00410eb0
mov ecx, dword [esp + 0x1098]
add esp, 8
cmp eax, esi
mov dword [ecx], eax
jl 0x40961e
mov eax, 0x2c
jmp 0x409999
mov ecx, 1
test edi, 0xff838580
je 0x409635
mov eax, 0x11
jmp 0x40998a
mov ebx, dword [esp + 0x1094]
cmp ebx, esi
jne 0x409645
mov ebx, 0x4303e8
lea eax, [ebx + 0x200]
mov dword [esp + 0x30], eax
lea edx, [ebx + 0x100]
mov eax, edi
mov dword [esp + 0x2c], edx
and eax, 0x700000
cmp eax, 0x300000
lea edx, [ebx + 0x340]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], edx
jg 0x4096be
je 0x4096b7
cmp eax, esi
je 0x409689
cmp eax, 0x100000
je 0x4096b0
cmp eax, 0x200000
jne 0x4096cc
mov eax, 0xa
cmp eax, 0xff
mov dword [esp + 0x70], esi
jle 0x4096e6
mov ecx, eax
sar ecx, 8
mov dword [esp + 0x74], 2
mov byte [esp + 0x78], cl
mov byte [esp + 0x79], al
jmp 0x4096ee
mov eax, 0xd
jmp 0x40968e
mov eax, 0xd0a
jmp 0x40968e
cmp eax, 0x400000
je 0x4096e0
cmp eax, 0x500000
je 0x4096d6
mov eax, 0x38
jmp 0x40998a
mov dword [esp + 0x70], 2
jmp 0x4096ee
mov dword [esp + 0x70], ecx
jmp 0x4096ee
mov dword [esp + 0x74], ecx
mov byte [esp + 0x78], al
lea edx, [esp + 0x7c]
mov eax, edx
mov dword [esp + 0x3c], eax
mov ecx, edx
mov eax, ebp
mov dword [esp + 0x38], edx
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x40], ebp
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409723
sub eax, edx
add eax, ebp
mov dword [esp + 0x44], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
push esi
lea edx, [esp + 0x88]
mov dword [esp + 0x28], edx
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x30]
push eax
push esi
push esi
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x40]
push eax
mov ecx, edi
and ecx, 7
push ecx
push edi
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], esi
mov dword [esp + 0x94], edi
mov byte [esp + 0xac], 0x58
call fcn.00408fb0
mov eax, dword [esp + 0x40]
add esp, 0x30
cmp eax, esi
jne 0x40998a
mov eax, dword [esp + 0x14]
cmp eax, 0x10000
jle 0x4097b2
mov eax, 0x14
jmp 0x40998a
mov edx, dword [esp + 0x54]
add edx, 3
imul edx, dword [esp + 0x50]
lea ebp, [edx + eax + 0x28]
push ebp
call dword [0x437fc8]
mov edi, eax
add esp, 4
cmp edi, esi
jne 0x4097dc
mov eax, 0x15
jmp 0x409983
mov dword [edi], 0x50435245
mov dword [edi + 4], ebp
mov eax, dword [esp + 0x64]
mov dword [edi + 8], eax
mov word [edi + 0x18], 0x28
mov dword [edi + 0xc], esi
mov word [edi + 0x14], si
mov word [edi + 0x16], si
mov cx, word [esp + 0x54]
mov word [edi + 0x1a], cx
movzx edx, word [esp + 0x50]
mov word [edi + 0x1c], dx
mov eax, ebx
sub eax, 0x4303e8
neg eax
sbb eax, eax
and eax, ebx
mov dword [edi + 0x20], eax
mov word [edi + 0x1e], si
mov dword [edi + 0x24], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x50], esi
movzx eax, word [edi + 0x18]
add eax, edi
mov dword [esp + 0x4c], eax
movzx ecx, word [edi + 0x1a]
movzx ebx, word [edi + 0x1c]
push esi
imul ebx, ecx
lea ecx, [esp + 0x2c]
push ecx
push esi
lea edx, [esp + 0x88]
mov dword [esp + 0x54], edx
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x30]
push ecx
push esi
add ebx, eax
mov eax, dword [esp + 0x1098]
push esi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], esi
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x38], eax
mov byte [ebx], 0x58
mov eax, dword [edi + 8]
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x40]
mov ecx, eax
push edx
and ecx, 7
push ecx
push eax
mov dword [esp + 0x4c], ebx
call fcn.00408fb0
movzx edx, word [esp + 0x88]
mov word [edi + 0x10], dx
mov ax, word [esp + 0x8c]
add esp, 0x30
mov word [edi + 0x12], ax
cmp dword [esp + 0x6c], esi
je 0x4098cd
or dword [edi + 8], 0x80000000
cmp dword [esp + 0x10], esi
jne 0x4098e4
mov ecx, dword [esp + 0x18]
cmp byte [ecx], 0
je 0x4098e4
mov dword [esp + 0x10], 0x16
mov eax, dword [esp + 0x1c]
mov byte [eax], 0
add eax, 1
sub eax, ebx
cmp eax, dword [esp + 0x14]
jle 0x409900
mov dword [esp + 0x10], 0x17
jmp 0x409975
cmp dword [esp + 0x10], esi
jne 0x409975
mov eax, dword [esp + 0x48]
lea edx, [esp + 0x7c]
cmp eax, edx
jbe 0x409963
sub eax, 2
mov dword [esp + 0x48], eax
xor ecx, ecx
mov ch, byte [eax]
mov edx, dword [edi + 8]
shr edx, 0xb
and edx, 1
mov cl, byte [eax + 1]
xor eax, eax
mov ebp, ecx
mov ah, byte [ebx + ebp]
mov al, byte [ebx + ebp + 1]
mov esi, eax
mov eax, ebx
call fcn.00405270
xor esi, esi
test eax, eax
je 0x409959
mov ecx, eax
sub ecx, ebx
sar ecx, 8
sub al, bl
mov byte [ebx + ebp], cl
mov byte [ebx + ebp + 1], al
cmp dword [esp + 0x10], esi
jmp 0x409904
mov dword [esp + 0x10], 0x35
jmp 0x409975
mov dx, word [edi + 0x12]
cmp dx, word [edi + 0x10]
jbe 0x4099c3
mov dword [esp + 0x10], 0xf
push edi
call dword [0x437fcc]
mov eax, dword [esp + 0x14]
add esp, 4
mov ebp, dword [esp + 0x1080]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1090]
sub ecx, ebp
mov dword [edx], ecx
mov ecx, dword [eax*4 + 0x437fd8]
mov edx, dword [esp + 0x108c]
mov dword [edx], ecx
mov ecx, dword [esp + 0x1088]
cmp ecx, esi
je 0x4099b6
mov dword [ecx], eax
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x106c
ret
mov eax, dword [edi + 8]
test al, 0x10
jne 0x409a4f
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x60]
push eax
push esi
lea ecx, [esp + 0x1c]
push ecx
push ebx
call fcn.00409230
add esp, 0x10
test eax, eax
je 0x4099f0
or dword [edi + 8], 0x10
jmp 0x409a4f
mov eax, dword [esp + 0x20]
cmp eax, esi
jge 0x409a0b
push esi
lea edx, [esp + 0x18]
push edx
push ebx
call fcn.00409460
add esp, 0xc
cmp eax, esi
jl 0x409a35
mov ecx, eax
and ecx, 0xff
test eax, 0x100
je 0x409a28
mov edx, dword [esp + 0x2c]
movzx edx, byte [edx + ecx]
cmp edx, ecx
jne 0x409a28
mov eax, ecx
or dword [edi + 8], 0x40000000
mov word [edi + 0x14], ax
jmp 0x409a4f
mov eax, dword [esp + 0x60]
push eax
push esi
push ebx
call fcn.00409310
add esp, 0xc
test eax, eax
je 0x409a4f
or dword [edi + 8], 0x10000000
mov eax, dword [esp + 0x24]
cmp eax, esi
jl 0x409a93
mov edx, dword [edi + 8]
test dl, 0x10
je 0x409a66
test eax, 0x200
je 0x409a93
mov ecx, eax
and ecx, 0xff
test eax, 0x100
je 0x409a86
mov esi, dword [esp + 0x2c]
movzx esi, byte [esi + ecx]
cmp esi, ecx
jne 0x409a86
and eax, 0xfffffeff
or edx, 0x20000000
mov word [edi + 0x16], ax
mov dword [edi + 8], edx
mov eax, edi
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x106c
ret