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

Disassembly:
sub esp, 0x7c
mov eax, dword [0x40a370]
xor eax, esp
mov dword [esp + 0x78], eax
cmp dword [esi + 0x24], 0
je 0x4035d6
push ebx
mov eax, 0xffffffc8
push ebp
lea ebx, [esi + 0x44]
sub eax, esi
push edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], eax
mov byte [esp + 0x13], 0
xor ebp, ebp
lea eax, [esi + 0x28]
nop
cmp dword [eax], 2
jl 0x403260
add ebp, 1
add eax, 4
cmp ebp, 3
jl 0x403250
mov eax, dword [ebx - 0x1c]
cmp eax, 3
jle 0x4035b8
mov edi, 2
cmp eax, edi
jle 0x4035b8
lea esp, [esp]
cmp byte [esp + 0x13], 0
jne 0x4035b8
xor eax, eax
test edi, edi
jle 0x4035ac
test eax, eax
jne 0x4035ac
cmp byte [esp + 0x13], al
jne 0x4035ac
mov edx, dword [ebx]
lea eax, [edi + edi*2]
add eax, eax
add eax, eax
add eax, eax
cmp dword [eax + edx + 8], 0
lea ecx, [eax + edx]
mov dword [esp + 0x18], eax
je 0x40359f
cmp dword [edx + 8], 0
je 0x40359f
call fcn.004030e0
test al, al
jne 0x40359f
mov eax, dword [ebx - 0x1c]
cdq
idiv edi
test edx, edx
jne 0x40359f
cmp edi, 1
mov dword [esp + 0xc], 1
jle 0x403344
mov eax, dword [esp + 0x18]
add eax, 0x18
mov dword [esp + 0x14], 0x18
mov dword [esp + 0x18], eax
lea esp, [esp]
mov eax, dword [ebx]
mov ecx, dword [esp + 0x14]
lea edx, [ecx + eax]
mov ecx, dword [esp + 0x18]
add ecx, eax
call fcn.004030e0
test al, al
jne 0x403344
mov eax, dword [esp + 0xc]
mov ecx, 0x18
add dword [esp + 0x14], ecx
add dword [esp + 0x18], ecx
add eax, 1
cmp eax, edi
mov dword [esp + 0xc], eax
jl 0x403310
cmp dword [esp + 0xc], edi
jne 0x40359a
mov eax, dword [ebx - 0x1c]
cdq
idiv edi
cmp dword [esp + 0x1c], 0
mov dword [esi + ebp*4 + 0x28], eax
mov dword [ebx - 0x1c], edi
je 0x40343e
mov edx, dword [esi + 0x48]
mov eax, dword [edx]
mov ecx, dword [esi + 0x44]
sub eax, 1
cmp eax, dword [ecx]
jle 0x403433
xor edi, edi
cmp dword [esi + ebp*4 + 0x28], edi
jle 0x403433
mov dword [esp + 0xc], edi
lea esp, [esp]
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 4]
push edx
lea eax, [esp + 0x34]
push eax
mov eax, dword [ebx - 0x1c]
imul eax, edi
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x48]
push ecx
mov ecx, dword [eax + edx*8]
movzx edx, word [0x40b1ee]
sub ecx, 1
push ecx
push edx
call sub.gnwie.dll_TWread
mov eax, dword [esi + 0x14]
sub eax, 1
push eax
push 0
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00401f40
add esp, 0x28
test eax, eax
jne 0x40341b
mov eax, dword [ebx - 0x1c]
mov edx, dword [esi + 0x48]
imul eax, edi
lea ecx, [eax + eax*2]
mov ecx, dword [edx + ecx*8]
mov edx, dword [esi + ebp*4 + 0x44]
mov eax, dword [esp + 0xc]
sub ecx, 1
mov dword [eax + edx], ecx
mov ecx, dword [esi + 4]
add ecx, dword [esp + 0x20]
mov edx, dword [esi + ebp*4 + 0x44]
mov dword [eax + edx + 4], ecx
mov ecx, dword [esi + ebp*4 + 0x44]
mov edx, dword [esp + 0x24]
mov dword [eax + ecx + 8], edx
jmp 0x40341f
mov eax, dword [esp + 0xc]
add edi, 1
add eax, 0x18
cmp edi, dword [esi + ebp*4 + 0x28]
mov dword [esp + 0xc], eax
jl 0x403390
cmp dword [esp + 0x1c], 0
jne 0x403528
mov eax, dword [esi + 0x44]
mov ecx, dword [esi]
mov eax, dword [eax]
add ecx, 1
cmp eax, ecx
jle 0x403528
mov edx, dword [esi + 0x3c]
mov ecx, dword [edx]
add ecx, 1
cmp eax, ecx
jle 0x403528
mov edx, dword [esi + 0xc]
push edx
mov edx, dword [esi + 4]
lea ecx, [esp + 0x34]
push ecx
push edx
add eax, 0xffffffff
push eax
movzx eax, word [0x40b1ee]
push eax
call sub.gnwie.dll_TWread
xor edi, edi
add esp, 0x14
xor ebx, ebx
cmp dword [esi + ebp*4 + 0x28], edi
jle 0x403524
mov dword [esp + 0xc], edi
mov edx, dword [esp + 0x28]
mov eax, dword [edx - 0x1c]
mov ecx, dword [esi + 0xc]
imul eax, edi
sub ecx, ebx
sub ecx, 1
push ecx
mov ecx, dword [esi + 0x44]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*8 + 0x1c]
sub edx, ebx
push edx
lea eax, [esp + ebx + 0x38]
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00401f40
add esp, 0x14
test eax, eax
jne 0x40350c
mov eax, dword [esi + 0x44]
mov ecx, dword [eax]
mov edx, dword [esi + ebp*4 + 0x44]
mov eax, dword [esp + 0xc]
sub ecx, 1
mov dword [eax + edx], ecx
mov ecx, dword [esi + 4]
add ecx, dword [esp + 0x20]
mov edx, dword [esi + ebp*4 + 0x44]
add ecx, ebx
mov dword [eax + edx + 4], ecx
mov ecx, dword [esi + ebp*4 + 0x44]
mov edx, dword [esp + 0x24]
mov dword [eax + ecx + 8], edx
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
add edx, ecx
add ebx, edx
jmp 0x403510
mov eax, dword [esp + 0xc]
add edi, 1
add eax, 0x18
cmp edi, dword [esi + ebp*4 + 0x28]
mov dword [esp + 0xc], eax
jl 0x403493
mov ebx, dword [esp + 0x28]
mov ecx, dword [esi + 0x40]
mov edx, dword [esp + 0x1c]
xor eax, eax
mov dword [ecx + edx + 8], eax
cmp dword [esi + 0x20], eax
mov dword [esp + 0x18], eax
jle 0x403596
mov eax, dword [esp + 0x2c]
add eax, ebx
lea ecx, [ebp*4 + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ecx
mov ecx, dword [esi + 0x38]
mov edx, dword [esp + 0x14]
mov eax, dword [edx + ecx]
cdq
idiv dword [ebx - 0x1c]
mov edx, dword [esp + 0xc]
mov dword [edx + ecx], eax
mov eax, dword [esi + 0x38]
mov ecx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [ecx]
cdq
idiv dword [ebx - 0x1c]
mov eax, dword [esp + 0x18]
add eax, 1
mov dword [esp + 0x18], eax
mov dword [ecx], edx
mov ecx, 0x18
add dword [esp + 0xc], ecx
add dword [esp + 0x14], ecx
cmp eax, dword [esi + 0x20]
jl 0x403553
add dword [esi + 0x24], 1
mov byte [esp + 0x13], 1
mov eax, 1
cmp edi, eax
jg 0x403295
add edi, 1
cmp edi, dword [ebx - 0x1c]
jl 0x403280
mov eax, dword [esp + 0x1c]
add eax, 0x18
add ebx, 4
cmp eax, 0x30
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], eax
jl 0x403245
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00406bfe
add esp, 0x7c
ret