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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
cmp dword [ebp + 0x14], 0
push ebx
mov ebx, ecx
je 0x40e434
push dword [ebp + 0x14]
call fcn.0040d30a
push dword [ebp + 8]
mov ecx, ebx
call fcn.0040855e
jmp 0x40e8af
mov edx, dword [ebp + 8]
push esi
mov esi, dword [edx]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x14], esi
test edi, edi
je 0x40e5b2
imul esi, esi, 0x14
add esi, dword [ebx + 0x1c]
push 5
pop ecx
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40e5b2
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str.__s:_PIECE__u_FAILED_HASH_CHECK
call fcn.004891ee
mov esi, dword [ebp + 8]
mov ecx, dword [ebx]
add esp, 0xc
inc dword [ebx + 0x13c]
push dword [esi]
lea edi, [ebx + 0xe0]
call fcn.0041ea14
add dword [edi], eax
adc dword [edi + 4], 0
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 4]
mov edx, dword [eax]
xor edi, edi
mov dword [ebp + 0xc], edx
test ecx, ecx
je 0x40e4ac
cmp edx, dword [eax]
jne 0x40e4bb
inc edi
add eax, 4
cmp edi, ecx
jne 0x40e4a0
xor edi, edi
test ecx, ecx
je 0x40e5a5
jmp 0x40e593
cmp dword [ebp + 0x10], 0
je 0x40e4d3
push 0
push dword [ebp + 0x10]
mov ecx, ebx
push esi
call fcn.0040daf3
jmp 0x40e8ad
mov edx, dword [ebx]
push ebx
push 0x40e38e
mov cl, 2
call fcn.00419d49
mov edi, eax
mov eax, dword [ebx + 8]
mul dword [esi]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
push dword [esi]
mov ecx, dword [ebx]
mov dword [ebp + 0x14], edi
call fcn.0041ea14
push 0x14
mov dword [edi + 0x20], eax
call fcn.00444d45
mov edi, eax
and dword [edi], 0
mov eax, dword [ebx + 0x18]
and dword [edi + 0xc], 0
mov dword [edi + 4], eax
mov esi, dword [esi + 4]
xor ecx, ecx
push 0x60
pop edx
mov eax, esi
mul edx
seto cl
mov dword [edi + 8], esi
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00444d45
pop ecx
pop ecx
test eax, eax
je 0x40e549
mov dword [eax], esi
add eax, 4
jmp 0x40e54b
xor eax, eax
xor esi, esi
mov dword [edi + 0x10], eax
cmp dword [edi + 8], esi
je 0x40e56d
and dword [ebp + 0x10], esi
mov ecx, dword [edi + 0x10]
add ecx, dword [ebp + 0x10]
call fcn.00438302
add dword [ebp + 0x10], 0x60
inc esi
cmp esi, dword [edi + 8]
jne 0x40e558
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov dword [ecx + 0x24], edi
mov dword [ecx + 0x38], eax
mov eax, dword [ebx + 0x210]
push 0
xor dl, dl
mov dword [ecx + 0x14], eax
call fcn.0041b04f
jmp 0x40e8ad
mov edx, dword [ebp + 0xc]
push edi
push dword [ebp + 0x14]
mov ecx, ebx
push edx
call fcn.00409346
inc edi
cmp edi, dword [esi + 4]
jne 0x40e590
push esi
mov ecx, ebx
call fcn.0040855e
jmp 0x40e8ad
cmp dword [ebp + 0x10], 0
je 0x40e714
push dword [ebx + 0xc8]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebx + 0xc0]
push 0
lea edx, [ebp - 0x30]
mov dword [ebp - 0x30], eax
call fcn.0040549b
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebx + 0xc8]
je 0x40e711
mov esi, eax
mov eax, dword [ebx + 0xc0]
imul esi, esi, 0x14
lea edi, [eax + esi]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], edi
cmp dword [edi], eax
jne 0x40e711
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x10], eax
je 0x40e6a2
mov dword [ebp - 0xc], eax
mov esi, dword [edi + 8]
add esi, dword [ebp - 0xc]
xor eax, eax
mov dword [ebp + 0xc], esi
mov dword [ebp - 8], eax
cmp dword [esi + 0xc], eax
je 0x40e670
mov dword [ebp - 4], eax
mov esi, dword [esi + 4]
add esi, dword [ebp - 4]
push 5
mov eax, dword [esi]
mov edi, eax
imul edi, edi, 0x14
add edi, dword [ebp + 0x10]
add esi, 4
pop ecx
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x40e659
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
push dword [eax]
mov ecx, ebx
call fcn.00409346
inc dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add dword [ebp - 4], 0x18
mov esi, eax
cmp ecx, dword [eax + 0xc]
jne 0x40e62d
mov edi, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
call fcn.004444fe
and dword [esi + 0xc], 0
mov eax, dword [esi]
add dword [ebp - 0xc], 0x10
mov ecx, 0xffff
add word [eax + 0x6f], cx
mov esi, dword [esi]
dec byte [esi + 0x5c]
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [edi + 0x10]
jne 0x40e617
mov esi, dword [ebp - 0x18]
mov ecx, dword [edi + 8]
call fcn.004444fe
and dword [edi + 0x10], 0
mov ecx, dword [ebx + 0xc0]
lea eax, [ebx + 0xc8]
dec dword [eax]
mov eax, dword [eax]
sub eax, dword [ebp - 0x1c]
add esi, ecx
imul eax, eax, 0x14
push eax
lea eax, [esi + 0x14]
push eax
push esi
call sub.MSVCRT.dll_memmove
mov ecx, dword [ebx + 0xc0]
lea esi, [ebx + 0xc8]
mov edx, dword [esi]
xor edi, edi
add esp, 0xc
cmp edx, edi
jne 0x40e6fd
call fcn.004444fe
mov dword [ebx + 0xc0], edi
mov dword [esi], edi
mov dword [ebx + 0xc4], edi
jmp 0x40e711
mov dword [ebx + 0xc4], edx
imul edx, edx, 0x14
call fcn.00444aa1
mov dword [ebx + 0xc0], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x178]
mov dword [ebx + 0x14c], eax
mov eax, dword [ebx + 0x64]
xor esi, esi
cmp dword [eax], edx
je 0x40e731
add eax, 4
inc esi
cmp dword [eax], edx
jne 0x40e729
dec dword [ebx + 0x6c]
mov ecx, dword [ebx + 0x6c]
cmp esi, ecx
je 0x40e744
mov eax, dword [ebx + 0x64]
mov ecx, dword [eax + ecx*4]
mov dword [eax + esi*4], ecx
mov ecx, dword [ebx + 0x20]
mov eax, dword [ebp + 0x14]
shr eax, 3
lea esi, [eax + ecx]
mov ecx, dword [ebp + 0x14]
and ecx, 7
mov al, 1
shl al, cl
mov ecx, edx
or byte [esi], al
call fcn.00404c46
inc dword [ebx + 0x10]
and byte [ebx + 0x208], 0xfe
test dword [0x4cb474], 0x40000000
je 0x40e78e
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str._s:_Piece__d_complete
call fcn.004891ee
add esp, 0xc
xor edi, edi
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e7b7
mov eax, dword [ebx + 0xa8]
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx]
push edi
push dword [ebp + 0x14]
call dword [eax + 4]
inc esi
cmp esi, dword [ebx + 0xb0]
jb 0x40e79a
xor edi, edi
mov ecx, ebx
call fcn.00404b9f
test al, al
je 0x40e81e
inc dword [0x4c9998]
mov eax, dword [ebx + 0x1cc]
cmp eax, edi
je 0x40e7e9
mov ecx, dword [0x4c3a18]
push eax
call fcn.00402f8f
push eax
push 8
mov edx, ebx
pop ecx
call fcn.0043a4cd
xor ecx, ecx
mov edx, ebx
inc ecx
call fcn.00470d36
push edi
xor edx, edx
xor ecx, ecx
call fcn.0041307d
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e81e
mov eax, dword [ebx + 0xa8]
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx]
call dword [eax + 8]
inc esi
cmp esi, dword [ebx + 0xb0]
jb 0x40e807
test byte [ebx + 0x43], 0x20
jne 0x40e848
xor esi, esi
cmp dword [ebx + 0x78], edi
je 0x40e848
mov eax, dword [ebx + 0x70]
mov ecx, dword [eax + esi*4]
test byte [ecx + 0x101], 2
je 0x40e842
push dword [ebp + 0x14]
call fcn.0042f34f
inc esi
cmp esi, dword [ebx + 0x78]
jne 0x40e82b
mov ecx, ebx
call fcn.00404b9f
test al, al
je 0x40e85a
mov ecx, ebx
call fcn.00405d2e
mov ecx, ebx
call fcn.00405d5f
push dword [ebx + 8]
mov ecx, dword [ebx]
push dword [ebx + 0x20]
call fcn.0041f855
test al, al
je 0x40e883
cmp byte [0x4b625e], 0
je 0x40e883
push edi
mov ecx, ebx
call fcn.0040d7d9
test byte [ebx + 0x3c], 1
je 0x40e894
mov ecx, ebx
call fcn.00404b9f
test al, al
je 0x40e8ad
mov ecx, dword [ebx]
push 0xfffffffffffffffe
call fcn.0041e9b3
mov ebx, dword [ebx + 4]
cmp ebx, edi
je 0x40e8ad
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.0041e9b3
pop edi
pop esi
pop ebx
leave
ret 0x10