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

Disassembly:
push 0xffffffffffffffff
push 0x516506
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x568cb8]
xor eax, esp
push eax
lea eax, [esp + 0xa0]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [esp + 0xb8]
xor esi, esi
mov dword [esp + 0x18], esi
cmp eax, 0xffffffff
jne 0x408f07
mov eax, dword [ebx]
mov edx, dword [eax + 0x18]
lea ecx, [esp + 0x18]
push ecx
push ebx
call edx
cmp eax, esi
je 0x408f0b
jmp 0x40957e
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0xbc]
mov dword [esp + 0x78], edi
cmp edi, esi
je 0x408f22
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0xac], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call fcn.0040a020
mov byte [esp + 0xa8], 1
xor ebp, ebp
mov dword [esp + 0x40], esi
cmp dword [esp + 0x18], ebp
jbe 0x409177
cmp dword [esp + 0xb8], 0xffffffff
jne 0x408f65
mov edi, esi
mov dword [esp + 0x44], edi
jmp 0x408f75
mov eax, dword [esp + 0xb4]
mov ecx, dword [eax + esi*4]
mov dword [esp + 0x44], ecx
mov edi, ecx
mov ecx, dword [ebx + 0x98]
sub ecx, dword [ebx + 0x94]
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x408f9b
call fcn.004bb13c
mov ecx, dword [ebx + 0x94]
mov eax, edi
imul eax, eax, 0x68
mov edx, dword [eax + ecx + 8]
or edx, dword [eax + ecx + 0xc]
jne 0x409009
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0xbc]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0xb4]
push edx
mov byte [esp + 0xb0], 2
mov ecx, dword [eax]
push edi
push eax
mov eax, dword [ecx + 0x1c]
call eax
mov edi, eax
test edi, edi
je 0x408fe8
cmp edi, 1
jne 0x409205
mov byte [esp + 0xa8], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x409161
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x409161
cmp ebp, edi
ja 0x409161
mov esi, ebp
imul esi, esi, 0x68
mov dword [esp + 0x14], esi
jmp 0x409028
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x44]
mov ecx, dword [ebx + 0x98]
xor eax, eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
cmp ebp, edi
sete al
sub ecx, dword [ebx + 0x94]
mov dword [esp + 0x4c], eax
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebp, ecx
jb 0x409071
call fcn.004bb13c
mov edx, dword [ebx + 0x94]
movzx eax, word [esi + edx + 0x32]
mov ecx, dword [ebx + 0x98]
and eax, 0x10
sub ecx, edx
mov dword [esp + 0x50], eax
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebp, ecx
jb 0x4090a5
call fcn.004bb13c
mov eax, dword [ebx + 0x94]
mov edx, dword [esi + eax + 8]
mov eax, dword [esi + eax + 0xc]
mov ecx, dword [ebx + 0x98]
sub ecx, dword [ebx + 0x94]
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], edx
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebp, ecx
jb 0x4090e1
call fcn.004bb13c
mov edx, dword [ebx + 0x94]
mov eax, dword [edx + esi + 4]
mov esi, dword [esp + 0x38]
lea ecx, [esp + 0x70]
mov dword [esp + 0x54], eax
call fcn.004703f0
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x74]
mov dword [esp + 0x78], esi
call fcn.004026e0
mov eax, dword [esp + 0x74]
mov edx, dword [eax + 4]
lea ecx, [eax + 4]
push edx
push eax
lea edi, [esp + 0x54]
mov dword [esp + 0x70], ecx
call fcn.0040a2f0
lea ecx, [esp + 0x24]
mov esi, eax
call fcn.0040a370
mov ecx, dword [esp + 0x5c]
add dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x60]
adc dword [esp + 0x20], edx
add dword [esp + 0x14], 0x68
mov dword [eax], esi
mov eax, dword [esi + 4]
inc ebp
mov dword [eax], esi
cmp ebp, dword [esp + 0x44]
jbe 0x409020
mov esi, dword [esp + 0x40]
inc esi
mov dword [esp + 0x40], esi
cmp esi, dword [esp + 0x18]
jb 0x408f53
mov edi, dword [esp + 0xbc]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
push ecx
push edx
push edi
call eax
mov ebp, eax
xor esi, esi
cmp ebp, esi
je 0x409262
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [esp + 0x38]
mov dword [ecx + 4], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x3c], esi
cmp eax, ecx
je 0x4091c5
mov ebx, dword [eax]
push eax
call fcn.004b7ea4
mov ecx, dword [esp + 0x3c]
add esp, 4
mov eax, ebx
cmp ebx, ecx
jne 0x4091b0
push ecx
call fcn.004b7ea4
add esp, 4
mov dword [esp + 0x38], esi
mov ecx, dword [esp + 0x24]
push 1
push ecx
lea ecx, [esp + 0x30]
call fcn.00461a10
lea ecx, [esp + 0x24]
call fcn.0046aeb0
mov dword [esp + 0xa8], 0xffffffff
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
mov eax, ebp
jmp 0x40957e
mov byte [esp + 0xa8], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40921d
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea esi, [esp + 0x24]
call fcn.0040a210
mov eax, dword [esp + 0x24]
push 1
push eax
lea ecx, [esp + 0x30]
call fcn.00461a10
mov ecx, esi
call fcn.0046aeb0
mov eax, dword [esp + 0xbc]
mov dword [esp + 0xa8], 0xffffffff
test eax, eax
je 0x40925b
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, edi
jmp 0x40957e
mov edx, dword [ebx + 0x7c]
mov eax, dword [ebx + 0x14]
mov ecx, dword [eax]
push esi
push esi
push edx
mov edx, dword [ebx + 0x78]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ebp, eax
cmp ebp, esi
je 0x40928b
lea esi, [esp + 0x24]
call fcn.0040a210
jmp 0x4091d2
push 0x20
call fcn.004bd0c6
mov ebp, eax
add esp, 4
cmp ebp, esi
je 0x4092f9
mov esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x30]
mov edx, dword [ebx + 0x34]
xor eax, eax
mov dword [ebp + 4], eax
mov dword [ebp], vtable.NKZ::CInStreamWithSize.0
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], edx
mov dword [ebp + 8], eax
cmp esi, eax
je 0x4092dd
mov eax, dword [esi]
mov ecx, dword [eax + 4]
push esi
call ecx
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, eax
je 0x4092da
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push ecx
call eax
xor eax, eax
mov dword [ebp + 8], esi
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x14], edx
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], eax
mov dword [esp + 0x14], ebp
xor esi, esi
jmp 0x4092ff
mov dword [esp + 0x14], esi
mov ebp, esi
mov dword [esp + 0x68], ebp
cmp ebp, esi
je 0x409310
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
push 0x40
mov byte [esp + 0xac], 3
call fcn.004bd0c6
mov ecx, eax
add esp, 4
cmp ecx, esi
je 0x409342
mov edx, dword [esp + 0xb0]
push edx
push edi
lea eax, [esp + 0x2c]
mov esi, ecx
call fcn.0040a640
mov ebp, eax
xor esi, esi
jmp 0x409344
xor ebp, ebp
mov dword [esp + 0x40], ebp
cmp ebp, esi
je 0x409355
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
mov dword [esp + 0x4c], vtable.NKZ::CBuffer_unsigned_char_.0
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov byte [esp + 0xa8], 5
cmp dword [ebx + 0x44], 1
jne 0x4093a5
mov al, byte [ebx + 0x48]
test al, al
je 0x4093a5
movzx edi, al
lea esi, [esp + 0x4c]
call fcn.0040b050
movzx edx, byte [ebx + 0x48]
mov ecx, dword [esp + 0x54]
push edx
lea eax, [ebx + 0x49]
push eax
push ecx
call fcn.004bd210
mov edi, dword [esp + 0xc8]
add esp, 0xc
xor esi, esi
mov eax, dword [ebx + 0x30]
movzx edx, byte [ebx + 0x42]
mov ecx, dword [ebx + 0x34]
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
movzx esi, byte [ebx + 0x41]
mov dword [esp + 0x80], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], ecx
mov ecx, dword [ebx + 0x44]
lea eax, [esp + 0x4c]
push eax
push ecx
mov dword [esp + 0x94], edx
mov edx, dword [esp + 0x28]
push ebp
mov dword [esp + 0x88], esi
mov esi, dword [esp + 0x20]
mov dword [esp + 0x9c], edx
push esi
lea edx, [esp + 0x8c]
push edx
push ebx
mov ecx, edi
lea ebx, [esp + 0x5c]
mov dword [esp + 0x9c], 0
call fcn.00408a40
mov ebx, eax
cmp ebx, 0xe00e0004
jne 0x409513
mov eax, dword [edi]
mov ecx, dword [eax + 0x14]
push ebx
push edi
call ecx
mov ebx, eax
test ebx, ebx
je 0x4094a6
mov edx, dword [esp + 0x54]
push edx
call fcn.004b7eaf
add esp, 4
mov byte [esp + 0xa8], 3
test ebp, ebp
je 0x40945a
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov byte [esp + 0xa8], 1
test esi, esi
je 0x40946e
mov edx, dword [esi]
mov eax, dword [edx + 8]
push esi
call eax
lea esi, [esp + 0x24]
call fcn.0040a210
mov ecx, dword [esp + 0x24]
push 1
push ecx
lea ecx, [esp + 0x30]
call fcn.00461a10
mov ecx, esi
call fcn.0046aeb0
mov dword [esp + 0xa8], 0xffffffff
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
jmp 0x40957c
mov ecx, dword [esp + 0x54]
push ecx
call fcn.004b7eaf
add esp, 4
mov byte [esp + 0xa8], 3
test ebp, ebp
je 0x4094c8
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov byte [esp + 0xa8], 1
test esi, esi
je 0x4094dc
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
push esi
call edx
lea esi, [esp + 0x24]
call fcn.0040a210
mov eax, dword [esp + 0x24]
push 1
push eax
lea ecx, [esp + 0x30]
call fcn.00461a10
mov ecx, esi
call fcn.0046aeb0
mov dword [esp + 0xa8], 0xffffffff
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
xor eax, eax
jmp 0x40957e
mov eax, dword [esp + 0x54]
push eax
call fcn.004b7eaf
add esp, 4
mov byte [esp + 0xa8], 3
test ebp, ebp
je 0x409535
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
mov byte [esp + 0xa8], 1
test esi, esi
je 0x409549
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
lea esi, [esp + 0x24]
call fcn.0040a210
mov edx, dword [esp + 0x24]
push 1
push edx
lea ecx, [esp + 0x30]
call fcn.00461a10
mov ecx, esi
call fcn.0046aeb0
mov dword [esp + 0xa8], 0xffffffff
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
mov eax, ebx
mov ecx, dword [esp + 0xa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret 0x10