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

Disassembly:
sub esp, 0x54
mov eax, dword [0x44277c]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x58]
push ebx
push ebp
push esi
mov esi, ecx
push edi
sub eax, 1
je 0x40e873
sub eax, 1
je 0x40e873
sub eax, 1
je 0x40e7ad
sub eax, 1
je 0x40e657
sub eax, 1
je 0x40e43f
sub eax, 1
jne 0x40e8de
mov ecx, dword [esi + 0x14]
xor ebp, ebp
mov edx, dword [esi + 4]
mov dword [esp + 0x14], ecx
lea eax, [ecx + ecx]
mov dword [esp + 0x18], eax
cmp ecx, 0x20000
ja 0x40e8e2
cmp edx, 0x400
ja 0x40e8e2
test edx, edx
je 0x40e8e2
mov eax, edx
mov dword [esp + 0x20], edx
xor bl, bl
mov edi, ecx
cmp ecx, dword [esp + 0x18]
jae 0x40e42c
mov ecx, dword [esp + 0x18]
mov eax, dword [esi]
sub bl, byte [eax + ebp]
inc ebp
mov byte [eax + edi], bl
add edi, edx
cmp edi, ecx
jb 0x40e415
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
inc ecx
sub eax, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], eax
jne 0x40e407
jmp 0x40e8de
mov ecx, dword [esi + 0x14]
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov dword [esp + 0x34], edx
add edx, ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], edx
cmp ecx, 0x20000
ja 0x40e8e2
cmp eax, 0x80
ja 0x40e8e2
test eax, eax
je 0x40e8e2
xor edi, edi
mov dword [esp + 0x28], edi
test eax, eax
je 0x40e8de
and dword [esp + 0x20], 0
lea eax, [esp + 0x44]
and dword [esp + 0x30], 0
xor esi, esi
and dword [esp + 0x3c], 0
xor ebx, ebx
and dword [esp + 0x1c], 0
xor ebp, ebp
push 0x1c
push esi
push eax
mov dword [esp + 0x1c], esi
call fcn.00422630
and dword [esp + 0x24], ebx
add esp, 0xc
mov dword [esp + 0x14], edi
cmp edi, dword [esp + 0x38]
jae 0x40e641
mov ecx, dword [esp + 0x30]
mov eax, ecx
sub eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x3c], ecx
mov ecx, edi
imul ecx, esi
mov esi, dword [esp + 0x40]
mov dl, byte [eax]
inc eax
mov dword [esp + 0x34], eax
mov eax, ebp
imul eax, dword [esp + 0x1c]
add ecx, eax
mov eax, ebx
imul eax, dword [esp + 0x30]
add ecx, eax
mov eax, dword [esp + 0x20]
lea eax, [ecx + eax*8]
shr eax, 3
movzx ecx, al
movzx eax, dl
sub ecx, eax
mov eax, dword [esp + 0x14]
mov byte [eax + esi], cl
mov al, cl
sub al, byte [esp + 0x20]
movsx esi, dl
movsx eax, al
shl esi, 3
push esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x24], ecx
call fcn.004289e7
add dword [esp + 0x48], eax
mov eax, esi
sub eax, dword [esp + 0x40]
push eax
call fcn.004289e7
add dword [esp + 0x50], eax
mov eax, dword [esp + 0x44]
add eax, esi
push eax
call fcn.004289e7
add dword [esp + 0x58], eax
mov eax, esi
sub eax, dword [esp + 0x28]
push eax
call fcn.004289e7
add dword [esp + 0x60], eax
mov eax, dword [esp + 0x2c]
add eax, esi
push eax
call fcn.004289e7
add dword [esp + 0x68], eax
mov eax, esi
sub eax, edi
push eax
call fcn.004289e7
add dword [esp + 0x70], eax
lea eax, [esi + edi]
push eax
call fcn.004289e7
add dword [esp + 0x78], eax
add esp, 0x1c
test byte [esp + 0x18], 0x1f
jne 0x40e61b
mov edx, dword [esp + 0x44]
xor eax, eax
and dword [esp + 0x44], eax
xor ecx, ecx
inc ecx
cmp dword [esp + ecx*4 + 0x44], edx
jae 0x40e5ba
mov edx, dword [esp + ecx*4 + 0x44]
mov eax, ecx
and dword [esp + ecx*4 + 0x44], 0
inc ecx
cmp ecx, 7
jb 0x40e5ae
mov esi, dword [esp + 0x10]
sub eax, 1
je 0x40e613
sub eax, 1
je 0x40e60b
sub eax, 1
je 0x40e603
sub eax, 1
je 0x40e5fb
sub eax, 1
je 0x40e5f3
sub eax, 1
jne 0x40e61f
cmp esi, 0x10
jge 0x40e61f
inc esi
mov dword [esp + 0x10], esi
jmp 0x40e61f
cmp esi, 0xfffffff0
jl 0x40e61f
dec esi
jmp 0x40e5ed
cmp ebp, 0x10
jge 0x40e61f
inc ebp
jmp 0x40e61f
cmp ebp, 0xfffffff0
jl 0x40e61f
dec ebp
jmp 0x40e61f
cmp ebx, 0x10
jge 0x40e61f
inc ebx
jmp 0x40e61f
cmp ebx, 0xfffffff0
jl 0x40e61f
dec ebx
jmp 0x40e61f
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
add ecx, eax
inc dword [esp + 0x18]
mov dword [esp + 0x14], ecx
cmp ecx, dword [esp + 0x38]
jb 0x40e4c6
mov edi, dword [esp + 0x28]
jmp 0x40e645
mov eax, dword [esp + 0x24]
inc edi
mov dword [esp + 0x28], edi
cmp edi, eax
jb 0x40e486
jmp 0x40e8de
mov eax, dword [esi + 4]
mov edi, dword [esi + 0x14]
mov dword [esp + 0x1c], eax
lea ebx, [eax - 3]
lea eax, [edi - 3]
cmp eax, 0x1fffd
ja 0x40e8e2
cmp ebx, edi
ja 0x40e8e2
mov eax, dword [esi + 8]
mov dword [esp + 0x30], eax
cmp eax, 2
ja 0x40e8e2
mov eax, dword [esi]
mov dword [esp + 0x10], eax
push 3
pop ebp
lea esi, [eax + edi]
xor eax, eax
mov ecx, esi
mov dword [esp + 0x20], esi
sub ecx, ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], ecx
xor ebx, ebx
cmp eax, edi
jae 0x40e76e
mov edx, dword [esp + 0x1c]
lea ebp, [ecx + eax]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
add eax, 0xfffffffd
sub eax, esi
mov dword [esp + 0x38], eax
add eax, ebp
cmp eax, edx
jb 0x40e73a
movzx eax, byte [ebp]
movzx ecx, byte [ebp - 3]
mov dword [esp + 0x28], eax
sub eax, ecx
push eax
mov dword [esp + 0x28], ecx
lea esi, [eax + ebx]
call fcn.004289e7
mov dword [esp + 0x44], eax
mov eax, esi
sub eax, dword [esp + 0x2c]
push eax
call fcn.004289e7
sub esi, dword [esp + 0x2c]
push esi
mov dword [esp + 0x24], eax
call fcn.004289e7
mov ecx, dword [esp + 0x4c]
add esp, 0xc
mov edx, dword [esp + 0x18]
cmp ecx, edx
jg 0x40e726
cmp ecx, eax
jg 0x40e726
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
jmp 0x40e73a
mov ecx, dword [esp + 0x10]
cmp edx, eax
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x28]
jle 0x40e73a
mov ebx, dword [esp + 0x24]
mov al, bl
sub al, byte [ecx]
inc ecx
mov byte [edx + ebp - 3], al
add ebp, 3
movzx ebx, al
mov eax, dword [esp + 0x38]
add eax, ebp
mov dword [esp + 0x10], ecx
cmp eax, edi
mov eax, dword [esp + 0x38]
jb 0x40e6ca
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
push 3
pop ebp
inc eax
mov dword [esp + 0x34], eax
cmp eax, ebp
jb 0x40e6a8
mov edx, dword [esp + 0x30]
lea eax, [edi - 2]
cmp edx, eax
jae 0x40e8de
lea ecx, [edx + 2]
sub eax, edx
add ecx, esi
xor edx, edx
dec eax
div ebp
lea edx, [eax + 1]
mov al, byte [ecx - 1]
add byte [ecx - 2], al
add byte [ecx], al
add ecx, ebp
sub edx, 1
jne 0x40e799
jmp 0x40e8de
mov eax, dword [esi + 0x14]
mov ebx, dword [esi]
lea edi, [eax - 0x15]
cmp edi, 0x3ffeb
ja 0x40e8e2
mov edx, dword [esi + 0x1c]
shr edx, 4
mov dword [esp + 0x14], edx
test edi, edi
je 0x40e8de
dec edi
shr edi, 4
inc edi
mov dword [esp + 0x24], edi
movzx eax, byte [ebx]
and eax, 0x1f
cmp eax, 0x10
jb 0x40e85c
mov al, byte [eax + 0x442078]
test al, al
je 0x40e85c
mov edi, dword [esp + 0x14]
xor ecx, ecx
movzx edx, al
push 0x12
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], edx
pop ebp
xor eax, eax
inc eax
shl eax, cl
test edx, eax
je 0x40e847
push 4
lea eax, [ebp + 0x18]
mov ecx, esi
push eax
push ebx
call fcn.0040e8f9
cmp eax, 5
jne 0x40e83f
push 0x14
push ebp
push ebx
mov ecx, esi
call fcn.0040e8f9
push 0x14
sub eax, edi
mov ecx, esi
push ebp
and eax, 0xfffff
push eax
push ebx
call fcn.0040e944
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
inc ecx
add ebp, 0x29
mov dword [esp + 0x18], ecx
cmp ebp, 0x64
jbe 0x40e805
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
add ebx, 0x10
inc edx
sub edi, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], edi
jne 0x40e7dc
jmp 0x40e8de
mov eax, dword [esi + 0x14]
mov ecx, dword [esi]
mov esi, dword [esi + 0x1c]
lea ebx, [eax - 4]
cmp ebx, 0x3fffc
ja 0x40e8e2
cmp dword [esp + 0x68], 2
sete al
xor edi, edi
add al, 0xe8
mov byte [esp + 0x2f], al
test ebx, ebx
je 0x40e8de
mov dl, byte [ecx]
inc ecx
inc edi
inc esi
cmp dl, 0xe8
je 0x40e8a8
cmp dl, al
jne 0x40e8da
mov edx, dword [ecx]
test edx, edx
jns 0x40e8bf
lea eax, [esi + edx]
test eax, eax
js 0x40e8cd
lea eax, [edx + 0x1000000]
mov dword [ecx], eax
jmp 0x40e8cd
lea eax, [edx - 0x1000000]
test eax, eax
jns 0x40e8cd
sub edx, esi
mov dword [ecx], edx
mov al, byte [esp + 0x2f]
add ecx, 4
add edi, 4
add esi, 4
cmp edi, ebx
jb 0x40e89a
mov al, 1
jmp 0x40e8e4
xor al, al
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004210e9
add esp, 0x54
ret 4