Function at 0x40e3b3
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 0x40e3d9
push dword [ebp + 0x14]
call fcn.0040d2af
push dword [ebp + 8]
mov ecx, ebx
call fcn.00408503
jmp 0x40e854
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 0x40e557
imul esi, esi, 0x14
add esi, dword [ebx + 0x1c]
push 5
pop ecx
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40e557
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str.__s:_PIECE__u_FAILED_HASH_CHECK
call fcn.004890f7
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.0041ea38
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 0x40e451
cmp edx, dword [eax]
jne 0x40e460
inc edi
add eax, 4
cmp edi, ecx
jne 0x40e445
xor edi, edi
test ecx, ecx
je 0x40e54a
jmp 0x40e538
cmp dword [ebp + 0x10], 0
je 0x40e478
push 0
push dword [ebp + 0x10]
mov ecx, ebx
push esi
call fcn.0040da98
jmp 0x40e852
mov edx, dword [ebx]
push ebx
push 0x40e333
mov cl, 2
call fcn.00419cf5
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.0041ea38
push 0x14
mov dword [edi + 0x20], eax
call fcn.00444d13
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.00444d13
pop ecx
pop ecx
test eax, eax
je 0x40e4ee
mov dword [eax], esi
add eax, 4
jmp 0x40e4f0
xor eax, eax
xor esi, esi
mov dword [edi + 0x10], eax
cmp dword [edi + 8], esi
je 0x40e512
and dword [ebp + 0x10], esi
mov ecx, dword [edi + 0x10]
add ecx, dword [ebp + 0x10]
call fcn.004382bd
add dword [ebp + 0x10], 0x60
inc esi
cmp esi, dword [edi + 8]
jne 0x40e4fd
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.0041affe
jmp 0x40e852
mov edx, dword [ebp + 0xc]
push edi
push dword [ebp + 0x14]
mov ecx, ebx
push edx
call fcn.004092eb
inc edi
cmp edi, dword [esi + 4]
jne 0x40e535
push esi
mov ecx, ebx
call fcn.00408503
jmp 0x40e852
cmp dword [ebp + 0x10], 0
je 0x40e6b9
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.00405441
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebx + 0xc8]
je 0x40e6b6
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 0x40e6b6
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x10], eax
je 0x40e647
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 0x40e615
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 0x40e5fe
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
push dword [eax]
mov ecx, ebx
call fcn.004092eb
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 0x40e5d2
mov edi, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
call fcn.004444cc
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 0x40e5bc
mov esi, dword [ebp - 0x18]
mov ecx, dword [edi + 8]
call fcn.004444cc
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 0x40e6a2
call fcn.004444cc
mov dword [ebx + 0xc0], edi
mov dword [esi], edi
mov dword [ebx + 0xc4], edi
jmp 0x40e6b6
mov dword [ebx + 0xc4], edx
imul edx, edx, 0x14
call fcn.00444a6f
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 0x40e6d6
add eax, 4
inc esi
cmp dword [eax], edx
jne 0x40e6ce
dec dword [ebx + 0x6c]
mov ecx, dword [ebx + 0x6c]
cmp esi, ecx
je 0x40e6e9
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.00404bec
inc dword [ebx + 0x10]
and byte [ebx + 0x208], 0xfe
test dword [0x4cb494], 0x40000000
je 0x40e733
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str._s:_Piece__d_complete
call fcn.004890f7
add esp, 0xc
xor edi, edi
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e75c
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 0x40e73f
xor edi, edi
mov ecx, ebx
call fcn.00404b45
test al, al
je 0x40e7c3
inc dword [0x4c99b8]
mov eax, dword [ebx + 0x1cc]
cmp eax, edi
je 0x40e78e
mov ecx, dword [0x4c3a38]
push eax
call fcn.00402f35
push eax
push 8
mov edx, ebx
pop ecx
call fcn.0043a4ac
xor ecx, ecx
mov edx, ebx
inc ecx
call fcn.00470c94
push edi
xor edx, edx
xor ecx, ecx
call fcn.00413027
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e7c3
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 0x40e7ac
test byte [ebx + 0x43], 0x20
jne 0x40e7ed
xor esi, esi
cmp dword [ebx + 0x78], edi
je 0x40e7ed
mov eax, dword [ebx + 0x70]
mov ecx, dword [eax + esi*4]
test byte [ecx + 0x101], 2
je 0x40e7e7
push dword [ebp + 0x14]
call fcn.0042f343
inc esi
cmp esi, dword [ebx + 0x78]
jne 0x40e7d0
mov ecx, ebx
call fcn.00404b45
test al, al
je 0x40e7ff
mov ecx, ebx
call fcn.00405cd4
mov ecx, ebx
call fcn.00405d05
push dword [ebx + 8]
mov ecx, dword [ebx]
push dword [ebx + 0x20]
call fcn.0041f879
test al, al
je 0x40e828
cmp byte [0x4b625e], 0
je 0x40e828
push edi
mov ecx, ebx
call fcn.0040d77e
test byte [ebx + 0x3c], 1
je 0x40e839
mov ecx, ebx
call fcn.00404b45
test al, al
je 0x40e852
mov ecx, dword [ebx]
push 0xfffffffffffffffe
call fcn.0041e9d7
mov ebx, dword [ebx + 4]
cmp ebx, edi
je 0x40e852
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.0041e9d7
pop edi
pop esi
pop ebx
leave
ret 0x10