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

Disassembly:
push ebp
push edi
push esi
mov esi, ecx
push ebx
sub esp, 0xdc
mov edi, dword [eax]
mov dword [esp + 0x38], eax
mov eax, edi
mov dword [esp + 0x34], edi
mov byte [esp + 0x53], al
movzx eax, byte [esp + 0x34]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xf0]
mov dword [eax + 0x270], 0
lea ebx, [eax + 0x270]
mov dword [ebx + 0x68], 0
mov eax, dword [esp + 0xf0]
mov ecx, ebx
lea ebp, [eax + 0x274]
mov eax, ebp
and eax, 0xfffffffc
sub ecx, eax
mov edi, eax
xor eax, eax
add ecx, 0x6c
shr ecx, 2
rep stosd dword es:[edi], eax
cmp byte [esp + 0x34], 0xc
ja 0x408408
mov dword [esp + 4], edx
lea edx, [esp + 0x64]
mov eax, dword [esp + 0xf0]
lea ecx, [esp + 0x60]
mov dword [esp], edx
mov edx, ebx
mov dword [esp + 8], esi
add eax, 0x4dc
call fcn.00407cd0
mov dword [esp + 0x48], eax
cmp eax, 0xffffff88
ja 0x4083f9
mov eax, dword [esp + 0x64]
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x18]
ja 0x408408
mov edx, dword [ebx + eax*4]
lea edi, [eax + 1]
mov dword [esp + 0x14], edi
test edx, edx
jne 0x408456
mov ecx, dword [esp + 0xf0]
nop
mov edx, eax
lea eax, [eax - 1]
mov esi, dword [ecx + edx*4 + 0x26c]
test esi, esi
je 0x407f60
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
sub ecx, dword [esp + 0x1c]
sub edi, eax
add eax, ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xf0]
add eax, 0x2a8
mov dword [esp + 0x24], eax
cmp edx, 1
jbe 0x408487
mov eax, ebp
lea ebx, [ebx + edx*4]
xor ecx, ecx
lea esi, [esi]
nop
mov esi, ecx
add eax, 4
add ecx, dword [eax - 4]
mov dword [eax + 0x34], esi
cmp ebx, eax
jne 0x407fb0
mov eax, dword [esp + 0xf0]
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x4c], ecx
add eax, 0x2dc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xf0]
mov dword [eax + 0x2a8], ecx
test ebp, ebp
je 0x40846d
mov edi, dword [esp + 0x24]
mov dword [esp + 0x24], edx
xor eax, eax
lea esi, [esi]
lea esi, [esi]
mov esi, dword [esp + 0xf0]
movzx ecx, byte [esi + eax + 0x4dc]
lea ebx, [edi + ecx*4]
mov edx, ecx
mov ecx, dword [ebx]
lea esi, [ecx + 1]
mov dword [ebx], esi
mov esi, dword [esp + 0x10]
lea ecx, [esi + ecx*2]
mov byte [ecx], al
add eax, 1
mov byte [ecx + 1], dl
cmp eax, ebp
jne 0x408000
mov eax, dword [esp + 0xf0]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
sub ecx, dword [esp + 0x1c]
mov dword [eax + 0x2a8], 0
lea edi, [ecx - 1]
cmp edx, 1
jbe 0x4080d1
mov ebx, dword [esp + 0xf0]
lea eax, [ecx*4]
add edi, edx
sub ebx, eax
xor eax, eax
lea esi, [esi]
nop
mov ebp, dword [ebx + ecx*4 + 0x274]
mov esi, eax
mov dword [ebx + ecx*4 + 4], esi
shl ebp, cl
add ecx, 1
add eax, ebp
cmp edi, ecx
jne 0x408070
mov edi, dword [esp + 0x20]
cmp dword [esp + 0x3c], edi
jae 0x4080d1
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0xf0]
mov ebp, edi
imul ebx, ecx, 0x34
lea esi, [eax + edx*4]
lea edi, [eax + 4]
lea esi, [esi]
nop
mov eax, edi
lea esi, [esi]
mov edx, dword [eax]
add eax, 4
shr edx, cl
mov dword [eax + ebx - 4], edx
cmp esi, eax
jne 0x4080b8
add ecx, 1
add ebx, 0x34
cmp ecx, ebp
jne 0x4080b0
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x18]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 4]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 8]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x20]
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x2c]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xf0]
mov eax, dword [eax + 0x30]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x4083db
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x4c]
sub eax, dword [esp + 0x14]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x10]
add edi, edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x28], eax
add eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x38]
add eax, 4
mov dword [esp + 0x5c], eax
lea esi, [esi]
mov eax, dword [esp + 0x28]
mov edx, 1
movzx edi, byte [eax]
movzx esi, byte [eax + 1]
mov word [esp + 0x18], di
mov edi, dword [esp + 0x14]
mov eax, dword [esp + esi*4 + 0x68]
mov dword [esp + 0x30], esi
sub edi, esi
add esi, dword [esp + 0x44]
mov ecx, esi
shl edx, cl
lea ebx, [edx + eax]
mov dword [esp + 0x2c], ebx
cmp esi, dword [esp + 0x3c]
jb 0x408420
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0xf0]
lea ecx, [ebx + edi]
mov ebx, 1
test ecx, ecx
cmovg ebx, ecx
mov ebp, dword [edx + ebx*4 + 0x2a4]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x10], ebx
lea edx, [edx + eax*4 + 4]
imul eax, edi, 0x34
add eax, dword [esp + 0xf0]
mov ebx, dword [eax]
mov dword [esp + 0x9c], ebx
mov ebx, dword [eax + 4]
mov dword [esp + 0xa0], ebx
mov ebx, dword [eax + 8]
mov dword [esp + 0xa4], ebx
mov ebx, dword [eax + 0xc]
mov dword [esp + 0xa8], ebx
mov ebx, dword [eax + 0x10]
mov dword [esp + 0xac], ebx
mov ebx, dword [eax + 0x14]
mov dword [esp + 0xb0], ebx
mov ebx, dword [eax + 0x18]
mov dword [esp + 0xb4], ebx
mov ebx, dword [eax + 0x1c]
mov dword [esp + 0xb8], ebx
mov ebx, dword [eax + 0x20]
mov dword [esp + 0xbc], ebx
mov ebx, dword [eax + 0x24]
mov dword [esp + 0xc0], ebx
mov ebx, dword [eax + 0x28]
mov dword [esp + 0xc4], ebx
mov ebx, dword [eax + 0x2c]
mov eax, dword [eax + 0x30]
mov dword [esp + 0xc8], ebx
mov dword [esp + 0xcc], eax
cmp ecx, 1
jle 0x408315
mov eax, dword [esp + 0x10]
mov ecx, edi
mov ebx, dword [esp + eax*4 + 0x9c]
test ebx, ebx
je 0x408315
mov dword [esp + 0x10], edi
movzx edi, word [esp + 0x18]
mov eax, edx
lea ebx, [edx + ebx*4]
nop
mov word [eax], di
add eax, 4
mov byte [eax - 2], cl
mov byte [eax - 1], 1
cmp ebx, eax
jne 0x408300
mov edi, dword [esp + 0x10]
cmp ebp, dword [esp + 0x4c]
je 0x4083bc
mov eax, edi
sub esi, dword [esp + 0x14]
mov byte [esp + 0x20], al
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x1c], esi
lea esi, [eax + ebp*2]
mov eax, dword [esp + 0x58]
add eax, dword [esp + 0xf0]
mov dword [esp + 0x24], eax
lea esi, [esi]
lea esi, [esi]
movzx edi, byte [esi + 0x2dd]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
lea ecx, [edi + ebx]
mov ebx, 1
mov eax, dword [esp + edi*4 + 0x9c]
shl ebx, cl
movzx ecx, byte [esi + 0x2dc]
sub ebp, edi
add ebx, eax
shl ecx, 8
add cx, word [esp + 0x18]
mov word [esp + 0x10], cx
movzx ecx, byte [esp + 0x20]
add ebp, ecx
nop
movzx ecx, word [esp + 0x10]
add eax, 1
mov byte [edx + eax*4 - 1], 2
mov word [edx + eax*4 - 4], cx
mov ecx, ebp
mov byte [edx + eax*4 - 2], cl
cmp ebx, eax
ja 0x408390
mov dword [esp + edi*4 + 0x9c], ebx
add esi, 2
cmp esi, dword [esp + 0x24]
jne 0x408350
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
add dword [esp + 0x28], 2
mov dword [esp + eax*4 + 0x68], edi
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x40], eax
jne 0x4081e8
movzx eax, byte [esp + 0x53]
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
shl eax, 0x10
and edx, 0xff00ffff
or edx, eax
mov eax, edx
mov ah, 1
mov dword [edi], eax
mov eax, dword [esp + 0x48]
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x48], 0xffffffd4
mov eax, dword [esp + 0x48]
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, edi
mov edi, dword [esp + 0x2c]
cmp eax, edi
jae 0x4083bc
mov esi, dword [esp + 0x38]
movzx ebx, word [esp + 0x18]
lea eax, [esi + eax*4 + 4]
mov esi, dword [esp + 0x5c]
lea ecx, [esi + edi*4]
nop
mov word [eax], bx
add eax, 4
mov byte [eax - 2], dl
mov byte [eax - 1], 1
cmp ecx, eax
jne 0x408440
jmp 0x4083bc
mov eax, dword [esp + 0x18]
mov dword [esp + 0x3c], 1
mov edx, edi
mov dword [esp + 0x20], eax
jmp 0x407f88
mov dword [eax + 0x2a8], 0
mov ecx, dword [esp + 0x18]
sub ecx, dword [esp + 0x1c]
lea edi, [ecx - 1]
jmp 0x408053
mov eax, dword [esp + 0xf0]
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x4c], 0
add eax, 0x2dc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xf0]
mov dword [eax + 0x2a8], 0
test ebp, ebp
jne 0x407fec
jmp 0x4080d1