Function at 0x40e3cf
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 0x40e3f5
push dword [ebp + 0x14]
call fcn.0040d2cb
push dword [ebp + 8]
mov ecx, ebx
call fcn.0040851e
jmp 0x40e870
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 0x40e573
imul esi, esi, 0x14
add esi, dword [ebx + 0x1c]
push 5
pop ecx
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40e573
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str.__s:_PIECE__u_FAILED_HASH_CHECK
call fcn.00488f98
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.0041ea10
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 0x40e46d
cmp edx, dword [eax]
jne 0x40e47c
inc edi
add eax, 4
cmp edi, ecx
jne 0x40e461
xor edi, edi
test ecx, ecx
je 0x40e566
jmp 0x40e554
cmp dword [ebp + 0x10], 0
je 0x40e494
push 0
push dword [ebp + 0x10]
mov ecx, ebx
push esi
call fcn.0040dab4
jmp 0x40e86e
mov edx, dword [ebx]
push ebx
push 0x40e34f
mov cl, 2
call fcn.00419d06
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.0041ea10
push 0x14
mov dword [edi + 0x20], eax
call fcn.00444d68
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.00444d68
pop ecx
pop ecx
test eax, eax
je 0x40e50a
mov dword [eax], esi
add eax, 4
jmp 0x40e50c
xor eax, eax
xor esi, esi
mov dword [edi + 0x10], eax
cmp dword [edi + 8], esi
je 0x40e52e
and dword [ebp + 0x10], esi
mov ecx, dword [edi + 0x10]
add ecx, dword [ebp + 0x10]
call fcn.0043829c
add dword [ebp + 0x10], 0x60
inc esi
cmp esi, dword [edi + 8]
jne 0x40e519
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.0041b012
jmp 0x40e86e
mov edx, dword [ebp + 0xc]
push edi
push dword [ebp + 0x14]
mov ecx, ebx
push edx
call fcn.00409306
inc edi
cmp edi, dword [esi + 4]
jne 0x40e551
push esi
mov ecx, ebx
call fcn.0040851e
jmp 0x40e86e
cmp dword [ebp + 0x10], 0
je 0x40e6d5
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.00405422
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebx + 0xc8]
je 0x40e6d2
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 0x40e6d2
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x10], eax
je 0x40e663
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 0x40e631
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 0x40e61a
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
push dword [eax]
mov ecx, ebx
call fcn.00409306
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 0x40e5ee
mov edi, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
call fcn.00444521
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 0x40e5d8
mov esi, dword [ebp - 0x18]
mov ecx, dword [edi + 8]
call fcn.00444521
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 0x40e6be
call fcn.00444521
mov dword [ebx + 0xc0], edi
mov dword [esi], edi
mov dword [ebx + 0xc4], edi
jmp 0x40e6d2
mov dword [ebx + 0xc4], edx
imul edx, edx, 0x14
call fcn.00444ac4
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 0x40e6f2
add eax, 4
inc esi
cmp dword [eax], edx
jne 0x40e6ea
dec dword [ebx + 0x6c]
mov ecx, dword [ebx + 0x6c]
cmp esi, ecx
je 0x40e705
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.00404bcd
inc dword [ebx + 0x10]
and byte [ebx + 0x208], 0xfe
test dword [0x4ca454], 0x40000000
je 0x40e74f
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str._s:_Piece__d_complete
call fcn.00488f98
add esp, 0xc
xor edi, edi
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e778
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 0x40e75b
xor edi, edi
mov ecx, ebx
call fcn.00404b26
test al, al
je 0x40e7df
inc dword [0x4c8978]
mov eax, dword [ebx + 0x1cc]
cmp eax, edi
je 0x40e7aa
mov ecx, dword [0x4c2a18]
push eax
call fcn.00402f35
push eax
push 8
mov edx, ebx
pop ecx
call fcn.0043a48b
xor ecx, ecx
mov edx, ebx
inc ecx
call fcn.00470b11
push edi
xor edx, edx
xor ecx, ecx
call fcn.00413075
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e7df
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 0x40e7c8
test byte [ebx + 0x43], 0x20
jne 0x40e809
xor esi, esi
cmp dword [ebx + 0x78], edi
je 0x40e809
mov eax, dword [ebx + 0x70]
mov ecx, dword [eax + esi*4]
test byte [ecx + 0x101], 2
je 0x40e803
push dword [ebp + 0x14]
call fcn.0042f358
inc esi
cmp esi, dword [ebx + 0x78]
jne 0x40e7ec
mov ecx, ebx
call fcn.00404b26
test al, al
je 0x40e81b
mov ecx, ebx
call fcn.00405cb5
mov ecx, ebx
call fcn.00405ce6
push dword [ebx + 8]
mov ecx, dword [ebx]
push dword [ebx + 0x20]
call fcn.0041f851
test al, al
je 0x40e844
cmp byte [0x4b525e], 0
je 0x40e844
push edi
mov ecx, ebx
call fcn.0040d79a
test byte [ebx + 0x3c], 1
je 0x40e855
mov ecx, ebx
call fcn.00404b26
test al, al
je 0x40e86e
mov ecx, dword [ebx]
push 0xfffffffffffffffe
call fcn.0041e9af
mov ebx, dword [ebx + 4]
cmp ebx, edi
je 0x40e86e
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.0041e9af
pop edi
pop esi
pop ebx
leave
ret 0x10