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

Disassembly:
sub esp, 0xd18
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp]
cmp eax, 1
jne 0x403d21
mov eax, dword [esp + 0xd38]
mov ecx, dword [esp + 0xd34]
push eax
push ecx
mov ecx, ebp
call fcn.004037d0
mov esi, eax
test esi, esi
je 0x403fa4
mov edx, dword [esp + 0xd3c]
mov ecx, ebp
push edx
call fcn.004043f0
push eax
mov eax, dword [ebp + 4]
push eax
call dword [0x446074]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0xd2c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0
push ecx
mov ecx, dword [esp + 0xd38]
push esi
push eax
push eax
mov eax, dword [ebp + 4]
push ecx
push edx
push eax
call dword [0x446060]
push esi
jmp 0x403f9c
cmp eax, 2
jne 0x403fa4
mov ecx, dword [ebp + 0x28]
lea edx, [esp + 0x14]
lea esi, [ebp + 0x30]
push edx
mov edi, dword [ecx + 0x18]
push esi
mov ecx, ebp
call fcn.00403ae0
test eax, eax
mov dword [esp + 0x20], eax
je 0x403fa4
mov dl, byte [eax + 0x2e]
mov ecx, dword [eax + 0xc]
test dl, 4
je 0x403d66
xor edx, edx
mov dx, word [eax + 0x2c]
mov eax, dword [esp + 0x14]
lea eax, [eax + edx*2]
jmp 0x403d74
xor edx, edx
mov dx, word [eax + 0x2c]
mov eax, edx
mov edx, dword [esp + 0x14]
add eax, edx
mov ebx, dword [esp + 0xd38]
lea eax, [eax + ecx + 6]
mov ecx, dword [esp + 0xd34]
push ebx
push ecx
push esi
mov ecx, ebp
mov dword [esp + 0x30], eax
call fcn.00403c20
test eax, eax
mov dword [esp + 0x1c], eax
je 0x403fa4
mov edx, dword [edi + 0x10]
add edx, 0x10
mov eax, dword [edx]
mov dword [esp + 0x28], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x2c], ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x30], eax
mov ecx, dword [edx + 0xc]
lea edx, [esp + 0x28]
push edx
push 0x28
mov dword [esp + 0x3c], ecx
call fcn.00409f40
mov edx, dword [ebp + 0x28]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x30]
push eax
add edx, 0x38
push ecx
push edx
call fcn.0040a540
add esp, 0x14
mov ecx, esi
push ebp
call fcn.004049c0
lea eax, [esp + 0x38]
push eax
call fcn.0040ab30
mov eax, dword [ebp + 0xd0]
mov ecx, dword [esp + 0xd30]
mov edx, dword [esp + 0xd34]
add esp, 4
test eax, eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
jge 0x403e1d
neg eax
shl eax, 6
test ebx, ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x38], eax
jle 0x403f97
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
mov si, word [ecx]
cmp si, 0xffff
je 0x403f7d
mov eax, dword [ebp + 0x28]
lea edx, [esp + 0x50]
add eax, 0x38
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
call fcn.0040a640
mov eax, dword [esp + 0x2c]
add esp, 0xc
test byte [eax + 0x2e], 8
je 0x403e9b
mov eax, dword [eax + 0xc]
and esi, 0xffff
xor ecx, ecx
xor edx, edx
mov ch, byte [eax + esi*4 + 3]
mov dl, byte [eax + esi*4 + 1]
mov cl, byte [eax + esi*4 + 2]
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + esi*4]
shl ecx, 8
or ecx, edx
jmp 0x403ead
mov eax, dword [eax + 0xc]
and esi, 0xffff
xor ecx, ecx
mov ch, byte [eax + esi*2 + 1]
mov cl, byte [eax + esi*2]
lea edx, [esp + 0x50]
push edx
push ecx
push eax
mov eax, dword [edi + 0x10]
mov ecx, dword [eax + 4]
push ecx
lea ecx, [esp + 0x78]
call fcn.00422650
mov edx, dword [esp + 0xf0]
mov ebx, 1
mov dword [esp + 0xd20], ebx
mov dword [esp + 0xd24], edi
mov dword [edx], 0
mov eax, dword [esp + 0xf4]
lea edx, [edi + 0x8c]
mov dword [eax], 0
mov ecx, dword [esp + 0xf4]
mov eax, dword [esp + 0xd3c]
push edx
mov dword [ecx + 4], 0
push eax
mov ecx, ebp
call fcn.00403820
mov ecx, dword [esp + 0xf0]
lea edx, [esp + 0x28]
push edx
push 0
mov dword [ecx + 4], eax
lea ecx, [esp + 0x70]
mov dword [esp + 0xf4], ebx
call fcn.0041f900
mov eax, dword [esp + 0x24]
xor ecx, ecx
mov ch, byte [eax + esi*2 + 1]
mov cl, byte [eax + esi*2]
mov eax, ecx
mov ecx, dword [ebp + 0xd0]
test ecx, ecx
jge 0x403f51
neg ecx
and eax, 0xffff
imul eax, ecx
cdq
mov ecx, dword [esp + 0x48]
and edx, 0x3ff
add eax, edx
sar eax, 0xa
and eax, 0xffff
add ecx, eax
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x68]
call fcn.00422730
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add ecx, 2
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jne 0x403e3c
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040b0b0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd18
ret 0x14