Function at 0x40e1b6
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 0x40e1dc
push dword [ebp + 0x14]
call fcn.0040d11e
push dword [ebp + 8]
mov ecx, ebx
call fcn.004084b9
jmp 0x40e657
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 0x40e35a
imul esi, esi, 0x14
add esi, dword [ebx + 0x1c]
push 5
pop ecx
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40e35a
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str.__s:_PIECE__u_FAILED_HASH_CHECK
call fcn.004875bd
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.0041dfbc
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 0x40e254
cmp edx, dword [eax]
jne 0x40e263
inc edi
add eax, 4
cmp edi, ecx
jne 0x40e248
xor edi, edi
test ecx, ecx
je 0x40e34d
jmp 0x40e33b
cmp dword [ebp + 0x10], 0
je 0x40e27b
push 0
push dword [ebp + 0x10]
mov ecx, ebx
push esi
call fcn.0040d8a1
jmp 0x40e655
mov edx, dword [ebx]
push ebx
push 0x40e136
mov cl, 2
call fcn.00419251
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.0041dfbc
push 0x14
mov dword [edi + 0x20], eax
call fcn.00443c1f
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.00443c1f
pop ecx
pop ecx
test eax, eax
je 0x40e2f1
mov dword [eax], esi
add eax, 4
jmp 0x40e2f3
xor eax, eax
xor esi, esi
mov dword [edi + 0x10], eax
cmp dword [edi + 8], esi
je 0x40e315
and dword [ebp + 0x10], esi
mov ecx, dword [edi + 0x10]
add ecx, dword [ebp + 0x10]
call fcn.0043721e
add dword [ebp + 0x10], 0x60
inc esi
cmp esi, dword [edi + 8]
jne 0x40e300
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov dword [ecx + 0x24], edi
mov dword [ecx + 0x38], eax
mov eax, dword [ebx + 0x204]
push 0
xor dl, dl
mov dword [ecx + 0x14], eax
call fcn.0041a4c3
jmp 0x40e655
mov edx, dword [ebp + 0xc]
push edi
push dword [ebp + 0x14]
mov ecx, ebx
push edx
call fcn.00409299
inc edi
cmp edi, dword [esi + 4]
jne 0x40e338
push esi
mov ecx, ebx
call fcn.004084b9
jmp 0x40e655
cmp dword [ebp + 0x10], 0
je 0x40e4bc
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.00405479
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebx + 0xc8]
je 0x40e4b9
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 0x40e4b9
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x10], eax
je 0x40e44a
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 0x40e418
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 0x40e401
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
push dword [eax]
mov ecx, ebx
call fcn.00409299
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 0x40e3d5
mov edi, dword [ebp - 0x14]
mov ecx, dword [esi + 4]
call fcn.004433ab
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 0x40e3bf
mov esi, dword [ebp - 0x18]
mov ecx, dword [edi + 8]
call fcn.004433ab
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 0x40e4a5
call fcn.004433ab
mov dword [ebx + 0xc0], edi
mov dword [esi], edi
mov dword [ebx + 0xc4], edi
jmp 0x40e4b9
mov dword [ebx + 0xc4], edx
imul edx, edx, 0x14
call fcn.0044397b
mov dword [ebx + 0xc0], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x174]
mov dword [ebx + 0x14c], eax
mov eax, dword [ebx + 0x64]
xor esi, esi
cmp dword [eax], edx
je 0x40e4d9
add eax, 4
inc esi
cmp dword [eax], edx
jne 0x40e4d1
dec dword [ebx + 0x6c]
mov ecx, dword [ebx + 0x6c]
cmp esi, ecx
je 0x40e4ec
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.00404c7b
inc dword [ebx + 0x10]
and byte [ebx + 0x1fc], 0xfe
test dword [0x4c8324], 0x40000000
je 0x40e536
push dword [ebp + 0x14]
mov eax, dword [ebx]
push dword [eax + 0x20]
push str._s:_Piece__d_complete
call fcn.004875bd
add esp, 0xc
xor edi, edi
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e55f
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 0x40e542
xor edi, edi
mov ecx, ebx
call fcn.00404bd4
test al, al
je 0x40e5c6
inc dword [0x4c6850]
mov eax, dword [ebx + 0x1c8]
cmp eax, edi
je 0x40e591
mov ecx, dword [0x4c0910]
push eax
call fcn.0040311e
push eax
push 8
mov edx, ebx
pop ecx
call fcn.00439416
xor ecx, ecx
mov edx, ebx
inc ecx
call fcn.0046f789
push edi
xor edx, edx
xor ecx, ecx
call fcn.00412d3a
xor esi, esi
cmp dword [ebx + 0xb0], edi
jbe 0x40e5c6
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 0x40e5af
test byte [ebx + 0x43], 0x20
jne 0x40e5f0
xor esi, esi
cmp dword [ebx + 0x78], edi
je 0x40e5f0
mov eax, dword [ebx + 0x70]
mov ecx, dword [eax + esi*4]
test byte [ecx + 0xf9], 2
je 0x40e5ea
push dword [ebp + 0x14]
call fcn.0042e34a
inc esi
cmp esi, dword [ebx + 0x78]
jne 0x40e5d3
mov ecx, ebx
call fcn.00404bd4
test al, al
je 0x40e602
mov ecx, ebx
call fcn.00405c7b
mov ecx, ebx
call fcn.00405cac
push dword [ebx + 8]
mov ecx, dword [ebx]
push dword [ebx + 0x20]
call fcn.0041eb03
test al, al
je 0x40e62b
cmp byte [0x4b325e], 0
je 0x40e62b
push edi
mov ecx, ebx
call fcn.0040d587
test byte [ebx + 0x3c], 1
je 0x40e63c
mov ecx, ebx
call fcn.00404bd4
test al, al
je 0x40e655
mov ecx, dword [ebx]
push 0xfffffffffffffffe
call fcn.0041df5b
mov ebx, dword [ebx + 4]
cmp ebx, edi
je 0x40e655
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.0041df5b
pop edi
pop esi
pop ebx
leave
ret 0x10