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

Disassembly:
sub esp, 0x60
push ebx
push ebp
push esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x24], edx
mov ebx, ecx
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x30]
push edi
mov edi, dword [esi + 0x10]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x4c], edx
mov edx, dword [esi + 0x2c]
mov ecx, ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
call fcn.00401e50
mov ecx, dword [eax]
mov edx, dword [eax + 8]
mov dword [esp + 0x64], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x58], edx
mov dword [esp + 0x54], ecx
xor edx, edx
xor ecx, ecx
mov dl, byte [eax + 6]
mov cl, byte [eax + 0xe]
mov dword [esp + 0x68], edx
mov ebp, ecx
mov ecx, dword [esp + 0x80]
xor edx, edx
mov dl, byte [eax + 0x16]
mov dword [esp + 0x5c], ebp
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x84]
mov ecx, dword [ecx + 0x24]
sar eax, 1
mov dword [esp + 0x3c], eax
mov eax, dword [edx + 0x10]
mov edx, dword [edx + 0x24]
mov dword [esp + 0x48], ecx
sar eax, 1
mov dword [esp + 0x40], eax
mov ax, word [edi]
mov word [esp + 0x50], ax
mov eax, dword [esp + 0x74]
test eax, eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x80], 0
jle 0x404381
jmp 0x40410f
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x28]
push eax
mov ecx, ebx
call fcn.00437a90
mov ecx, dword [esi + 0x14]
mov edi, eax
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x28]
dec edi
push esi
neg edi
sbb edi, edi
push ecx
add edi, 2
add edx, eax
push edi
mov ecx, ebx
mov dword [esp + 0x78], edi
call fcn.00401a60
mov edx, dword [esi]
xor ebx, ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x24], ebx
lea edx, [edx + edx*2]
shl edx, 3
cmp dword [edx + 0x46518c], ebx
jle 0x40432c
jmp 0x404171
mov ebx, dword [esp + 0x24]
mov eax, dword [esi + 0x34]
mov ecx, ebx
add ecx, eax
mov eax, dword [esp + 0x10]
imul ecx, dword [esp + 0x3c]
add ecx, eax
mov eax, dword [esi + 0x40]
add eax, ebx
mov edx, dword [edx + 0x465188]
imul eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x34], 0
shl edx, 1
add eax, ebx
test edx, edx
jle 0x40430f
mov edx, dword [esp + 0x44]
lea eax, [edx + eax*2]
mov edx, dword [esp + 0x48]
mov dword [esp + 0x30], eax
lea ecx, [edx + ecx*2]
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x84]
lea edx, [edx + ecx*4]
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x1c]
mov ebx, dword [ecx]
cmp ebx, 9
jne 0x4041eb
mov dx, word [esp + 0x50]
mov word [eax], dx
jmp 0x4042c4
test ebx, ebx
je 0x4042c4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x54]
mov edi, 9
mov si, word [eax]
sub edi, ebx
and esi, 0xffff
mov eax, dword [esp + 0x18]
mov edx, esi
and edx, ecx
mov ecx, dword [esp + 0x2c]
shr edx, cl
xor ecx, ecx
mov cx, word [eax + ebx*2 + 0x34]
mov eax, 0x38e38e39
imul edx, edi
add edx, ecx
imul edx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [esp + 0x2c]
mov eax, edx
mov edx, esi
shl eax, cl
mov ecx, dword [esp + 0x58]
and edx, ecx
mov ecx, ebp
shr edx, cl
mov ebp, dword [esp + 0x18]
xor ecx, ecx
mov dword [esp + 0x60], eax
mov eax, 0x38e38e39
mov cx, word [ebp + ebx*2 + 0x20]
mov ebp, dword [esp + 0x5c]
imul edx, edi
add edx, ecx
mov ecx, ebp
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, edx
mov edx, dword [esp + 0x60]
shl eax, cl
mov ecx, dword [esp + 0x64]
and esi, ecx
mov ecx, dword [esp + 0x68]
shr esi, cl
or edx, eax
xor eax, eax
mov dword [esp + 0x60], edx
imul esi, edi
mov edi, dword [esp + 0x18]
mov ax, word [edi + ebx*2 + 0xc]
mov edi, dword [esp + 0x6c]
add esi, eax
mov eax, 0x38e38e39
imul esi
sar edx, 1
mov eax, edx
mov esi, dword [esp + 0x78]
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x30]
shl edx, cl
mov ecx, dword [esp + 0x60]
or ecx, edx
mov word [eax], cx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x84]
add ecx, 4
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi]
inc edx
add ebx, 2
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x84], edx
mov edx, dword [esp + 0x34]
add eax, 2
mov ecx, dword [ecx*8 + 0x465188]
inc edx
shl ecx, 1
cmp edx, ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
jl 0x4041d3
mov edx, dword [esi]
mov eax, dword [esp + 0x24]
inc eax
lea edx, [edx + edx*2]
mov dword [esp + 0x24], eax
shl edx, 3
cmp eax, dword [edx + 0x46518c]
jl 0x40416d
mov eax, dword [esp + 0x7c]
cmp eax, 0xffffffff
jne 0x40434a
cmp edi, 2
jne 0x404342
mov edx, dword [esi + 4]
mov eax, dword [edx + 8]
jmp 0x404351
mov eax, dword [esi + 4]
mov eax, dword [eax + 8]
jmp 0x40434f
cmp edi, 2
je 0x404351
sar eax, 1
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
add edx, eax
add ecx, eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x74]
add eax, edi
cmp eax, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x80], eax
jl 0x40410b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret 0x14