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

Disassembly:
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, dword [esp + 0x84]
mov dword [esp + 0x40], edx
mov dword [esp + 0x68], edi
mov eax, dword [edi + 0xc]
mov ebx, dword [edi + 8]
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x18]
mov ebp, dword [esi + 0x10]
lea eax, [eax + eax*2]
shl eax, 6
add eax, ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x30]
mov dword [esp + 0x50], edx
mov edx, dword [esi + 0x2c]
mov ecx, edi
mov dword [esp + 0x74], ebp
mov dword [esp + 0x14], eax
call fcn.00401e50
mov ecx, dword [eax]
mov edx, dword [eax + 8]
mov dword [esp + 0x60], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x58], edx
mov dword [esp + 0x54], ecx
xor edx, edx
xor ebx, ebx
mov dl, byte [eax + 6]
mov bl, byte [eax + 0xe]
xor ecx, ecx
mov dword [esp + 0x64], edx
mov cl, byte [eax + 0x16]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x5c], ebx
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x24]
sar ecx, 1
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x80]
mov edx, dword [ecx + 0x10]
mov ecx, dword [ecx + 0x24]
sar edx, 1
mov dword [esp + 0x90], edx
mov edx, dword [esp + 0x44]
test eax, eax
mov dx, word [edx]
mov dword [esp + 0x24], ecx
mov word [esp + 0x6c], dx
mov dx, word [ebp]
mov word [esp + 0x78], dx
mov dword [esp + 0x34], 0
jle 0x4025fa
jmp 0x4020b9
mov edi, dword [esp + 0x68]
mov esi, dword [esp + 0x84]
mov edx, dword [esp + 0x34]
mov ecx, edi
push edx
mov edx, dword [esp + 0x44]
call fcn.00437a90
mov ecx, dword [esi + 0x14]
dec eax
mov edx, dword [esp + 0x34]
push esi
neg eax
sbb eax, eax
push ecx
add eax, 2
mov ecx, edi
mov dword [esp + 0x44], eax
push eax
mov eax, dword [esp + 0x4c]
add edx, eax
call fcn.00401a60
mov eax, dword [esi + 0x34]
imul eax, dword [esp + 0x20]
mov edx, dword [esp + 0x90]
mov ecx, dword [esp + 0x14]
imul edx, dword [esi + 0x40]
mov edi, dword [esp + 0x10]
add eax, ecx
mov ecx, dword [esi + 4]
mov esi, dword [esp + 0x2c]
add edx, edi
mov edi, dword [esp + 0x24]
mov ecx, dword [ecx]
mov dword [esp + 0x8c], edx
lea edi, [edi + edx*2]
lea esi, [esi + eax*2]
lea ecx, [ecx*4 + 4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x8c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x84]
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x90]
add eax, edi
mov ecx, dword [ecx + 4]
mov edi, dword [esp + 0x24]
add edx, esi
mov esi, dword [esp + 0x2c]
mov ecx, dword [ecx]
mov dword [esp + 0x8c], edx
lea edi, [edi + edx*2]
lea esi, [esi + eax*2]
lea ecx, [ecx*4 + 4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x90]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x8c]
mov esi, dword [esp + 0x20]
add ecx, edx
mov edx, dword [esp + 0x84]
add eax, esi
xor esi, esi
mov edi, dword [edx + 4]
cmp dword [edi + 4], esi
jle 0x4021e5
mov edi, dword [esp + 0x24]
lea ecx, [edi + ecx*2]
mov edi, dword [esp + 0x2c]
lea eax, [edi + eax*2]
mov di, word [eax]
mov word [ecx], di
mov di, word [eax + 2]
mov word [ecx + 2], di
mov edi, dword [esp + 0x20]
add edi, edi
add eax, edi
mov edi, dword [esp + 0x90]
add edi, edi
add ecx, edi
mov edi, dword [edx + 4]
inc esi
cmp esi, dword [edi + 4]
jl 0x4021bb
mov eax, dword [edx]
xor ecx, ecx
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x1c], ecx
lea eax, [eax + eax*2]
shl eax, 3
cmp dword [eax + 0x46518c], ecx
jle 0x4023de
jmp 0x40220c
mov ecx, dword [esp + 0x1c]
mov esi, dword [edx + 0x34]
mov edi, dword [esp + 0x14]
mov eax, dword [eax + 0x465188]
mov dword [esp + 0x18], 0
lea esi, [esi + ecx + 2]
imul esi, dword [esp + 0x20]
shl eax, 1
lea edi, [esi + edi + 2]
mov esi, dword [edx + 0x40]
lea ecx, [ecx + esi + 2]
mov esi, dword [esp + 0x10]
imul ecx, dword [esp + 0x90]
test eax, eax
lea ecx, [ecx + esi + 2]
jle 0x4023c1
mov eax, dword [esp + 0x24]
lea ecx, [eax + ecx*2]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x4c], ecx
lea esi, [eax + edi*2]
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x8c]
mov dword [esp + 0x48], esi
lea eax, [eax + edi*4]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
cmp eax, 9
mov dword [esp + 0x28], eax
jne 0x402293
mov ax, word [esp + 0x6c]
mov word [ecx], ax
jmp 0x402376
test eax, eax
jne 0x4022a2
mov ax, word [esi]
mov word [ecx], ax
jmp 0x402376
mov si, word [esi]
mov ecx, dword [esp + 0x54]
and esi, 0xffff
mov edi, 9
mov edx, esi
sub edi, eax
and edx, ecx
mov ecx, dword [esp + 0x30]
shr edx, cl
mov ebp, dword [esp + 0x44]
xor ecx, ecx
mov cx, word [ebp + eax*2 + 0x34]
mov eax, 0x38e38e39
imul edx, edi
add edx, ecx
mov ecx, dword [esp + 0x30]
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, edx
mov edx, esi
shl eax, cl
mov ecx, dword [esp + 0x58]
and edx, ecx
mov ecx, ebx
shr edx, cl
mov ebx, dword [esp + 0x28]
xor ecx, ecx
mov dword [esp + 0x70], eax
mov eax, 0x38e38e39
mov cx, word [ebp + ebx*2 + 0x20]
mov ebx, dword [esp + 0x5c]
imul edx, edi
add edx, ecx
mov ecx, ebx
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, edx
mov edx, dword [esp + 0x70]
shl eax, cl
mov ecx, dword [esp + 0x60]
and esi, ecx
mov ecx, dword [esp + 0x64]
shr esi, cl
or edx, eax
xor eax, eax
mov dword [esp + 0x70], edx
imul esi, edi
mov edi, dword [esp + 0x28]
mov ax, word [ebp + edi*2 + 0xc]
mov ebp, dword [esp + 0x74]
add esi, eax
mov eax, 0x38e38e39
imul esi
sar edx, 1
mov eax, edx
mov esi, dword [esp + 0x48]
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x70]
shl edx, cl
mov ecx, dword [esp + 0x4c]
or eax, edx
mov edx, dword [esp + 0x84]
mov word [ecx], ax
mov eax, dword [esp + 0x8c]
mov edi, dword [esp + 0x38]
inc eax
add edi, 4
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x18]
add esi, 2
add ecx, 2
inc eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x18], eax
mov eax, dword [edx]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x48], esi
lea eax, [eax + eax*2]
mov dword [esp + 0x4c], ecx
mov eax, dword [eax*8 + 0x465188]
shl eax, 1
cmp edi, eax
jl 0x402277
mov eax, dword [edx]
mov ecx, dword [esp + 0x1c]
inc ecx
lea eax, [eax + eax*2]
mov dword [esp + 0x1c], ecx
shl eax, 3
cmp ecx, dword [eax + 0x46518c]
jl 0x402208
mov ecx, dword [edx]
xor esi, esi
mov dword [esp + 0x8c], esi
mov dword [esp + 0x1c], esi
lea ecx, [ecx + ecx*2]
shl ecx, 3
cmp dword [ecx + 0x46518c], esi
jle 0x40259d
mov edi, dword [edx + 0x40]
mov eax, esi
add eax, edi
mov ecx, dword [ecx + 0x465188]
imul eax, dword [esp + 0x90]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x18], 0
shl ecx, 1
add eax, edi
test ecx, ecx
jle 0x402584
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x8c]
lea ecx, [esi + eax*2]
mov eax, dword [esp + 0x50]
sub esi, esi
mov dword [esp + 0x4c], ecx
lea eax, [eax + edi*4]
mov dword [esp + 0x48], esi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
cmp eax, 9
mov dword [esp + 0x28], eax
jne 0x40246b
mov ax, word [esp + 0x78]
mov word [ecx], ax
jmp 0x402540
test eax, eax
je 0x402540
mov si, word [esi + ecx]
mov ecx, dword [esp + 0x54]
and esi, 0xffff
mov edi, 9
mov edx, esi
sub edi, eax
and edx, ecx
mov ecx, dword [esp + 0x30]
shr edx, cl
xor ecx, ecx
mov cx, word [ebp + eax*2 + 0x34]
mov eax, 0x38e38e39
imul edx, edi
add edx, ecx
mov ecx, dword [esp + 0x30]
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, edx
mov edx, esi
shl eax, cl
mov ecx, dword [esp + 0x58]
and edx, ecx
mov ecx, ebx
shr edx, cl
mov ebx, dword [esp + 0x28]
xor ecx, ecx
mov dword [esp + 0x70], eax
mov eax, 0x38e38e39
mov cx, word [ebp + ebx*2 + 0x20]
mov ebx, dword [esp + 0x5c]
imul edx, edi
add edx, ecx
mov ecx, ebx
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, edx
mov edx, dword [esp + 0x70]
shl eax, cl
mov ecx, dword [esp + 0x60]
and esi, ecx
mov ecx, dword [esp + 0x64]
shr esi, cl
or edx, eax
xor eax, eax
mov dword [esp + 0x70], edx
imul esi, edi
mov edi, dword [esp + 0x28]
mov ax, word [ebp + edi*2 + 0xc]
add esi, eax
mov eax, 0x38e38e39
imul esi
sar edx, 1
mov eax, edx
mov esi, dword [esp + 0x48]
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x70]
shl edx, cl
mov ecx, dword [esp + 0x4c]
or eax, edx
mov edx, dword [esp + 0x84]
mov word [ecx], ax
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x8c]
add eax, 4
inc edi
mov dword [esp + 0x38], eax
mov eax, dword [edx]
mov dword [esp + 0x8c], edi
mov edi, dword [esp + 0x18]
lea eax, [eax + eax*2]
add ecx, 2
inc edi
mov dword [esp + 0x4c], ecx
mov eax, dword [eax*8 + 0x465188]
mov dword [esp + 0x18], edi
shl eax, 1
cmp edi, eax
jl 0x40244f
mov esi, dword [esp + 0x1c]
mov ecx, dword [edx]
inc esi
mov dword [esp + 0x1c], esi
lea ecx, [ecx + ecx*2]
shl ecx, 3
cmp esi, dword [ecx + 0x46518c]
jl 0x4023ff
mov eax, dword [esp + 0x88]
cmp eax, 0xffffffff
jne 0x4025c0
cmp dword [esp + 0x3c], 2
jne 0x4025b8
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 8]
jmp 0x4025c9
mov edx, dword [edx + 4]
mov eax, dword [edx + 8]
jmp 0x4025c7
cmp dword [esp + 0x3c], 2
je 0x4025c9
sar eax, 1
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
add edx, eax
add ecx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x80]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x34], eax
jl 0x4020ae
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x14