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

Disassembly:
push 0xffffffffffffffff
push 0x4afc16
mov eax, dword fs:[0]
push eax
sub esp, 0x88
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4d5784]
xor eax, esp
push eax
lea eax, [esp + 0x9c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xac]
mov eax, dword [esp + 0xb8]
xor esi, esi
mov dword [esp + 0x18], esi
cmp eax, 0xffffffff
jne 0x4027ed
mov eax, dword [ebp]
mov edx, dword [eax + 0x18]
lea ecx, [esp + 0x18]
push ecx
push ebp
call edx
cmp eax, esi
je 0x4027f1
jmp 0x402daa
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0xbc]
mov dword [esp + 0x28], edi
cmp edi, esi
je 0x402808
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0xa8], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
call fcn.00403850
mov byte [esp + 0xa4], 1
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x18], esi
ja 0x4028c4
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov ecx, dword [edi]
mov ecx, dword [ecx + 0xc]
push edx
push eax
push edi
call ecx
mov ebx, eax
cmp ebx, esi
je 0x402b0d
mov ecx, dword [esp + 0x6c]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [esp + 0x6c]
mov dword [ecx + 4], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x70], esi
cmp eax, ecx
je 0x402889
mov esi, dword [eax]
push eax
call fcn.0042f8dc
mov ecx, dword [esp + 0x70]
add esp, 4
mov eax, esi
cmp esi, ecx
jne 0x402872
xor esi, esi
push ecx
call fcn.0042f8dc
mov edx, dword [esp + 0x5c]
add esp, 4
push edx
mov dword [esp + 0x70], esi
call fcn.0042f8dc
mov dword [esp + 0xa8], 0xffffffff
mov eax, dword [edi]
mov ecx, dword [eax + 8]
add esp, 4
push edi
call ecx
jmp 0x402da8
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0xb8], 0xffffffff
jne 0x4028d6
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x4028e6
mov ecx, dword [esp + 0xb4]
mov edx, dword [ecx + eax*4]
mov dword [esp + 0x14], edx
mov esi, edx
mov ecx, dword [ebp + 0x98]
sub ecx, dword [ebp + 0x94]
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x40290c
call fcn.0042ffa7
mov ecx, dword [ebp + 0x94]
mov eax, esi
imul eax, eax, 0x68
mov edx, dword [eax + ecx + 8]
or edx, dword [eax + ecx + 0xc]
jne 0x402973
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0xb0]
lea ecx, [esp + 0x14]
push ecx
push edx
mov byte [esp + 0xac], 2
mov eax, dword [edi]
mov eax, dword [eax + 0x1c]
push esi
push edi
call eax
mov edi, eax
test edi, edi
je 0x402952
cmp edi, 1
jne 0x402aba
mov byte [esp + 0xa4], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x402a99
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x402a99
cmp ebx, esi
ja 0x402aa0
mov edi, ebx
imul edi, edi, 0x68
jmp 0x402986
mov esi, dword [esp + 0x14]
mov ecx, dword [ebp + 0x98]
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
cmp ebx, esi
sete al
sub ecx, dword [ebp + 0x94]
mov dword [esp + 0x3c], eax
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebx, ecx
jb 0x4029cf
call fcn.0042ffa7
mov edx, dword [ebp + 0x94]
movzx eax, word [edi + edx + 0x32]
mov ecx, dword [ebp + 0x98]
and eax, 0x10
sub ecx, edx
mov dword [esp + 0x40], eax
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebx, ecx
jb 0x402a03
call fcn.0042ffa7
mov eax, dword [ebp + 0x94]
mov edx, dword [edi + eax + 8]
mov eax, dword [edi + eax + 0xc]
mov ecx, dword [ebp + 0x98]
sub ecx, dword [ebp + 0x94]
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], edx
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebx, ecx
jb 0x402a3f
call fcn.0042ffa7
mov edx, dword [ebp + 0x94]
mov eax, dword [edx + edi + 4]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x6c]
lea ecx, [eax + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [ecx]
push ecx
push eax
lea esi, [esp + 0x44]
call fcn.00403b20
lea ecx, [esp + 0x58]
mov esi, eax
call fcn.00403b70
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x50]
mov dword [edx], esi
mov eax, dword [esi + 4]
mov dword [eax], esi
mov eax, dword [esp + 0x4c]
add dword [esp + 0x34], eax
adc dword [esp + 0x38], ecx
inc ebx
add edi, 0x68
cmp ebx, dword [esp + 0x14]
jbe 0x402982
mov edi, dword [esp + 0xbc]
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x18]
jb 0x4028c0
xor esi, esi
jmp 0x40283b
mov byte [esp + 0xa4], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x402ad2
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
lea esi, [esp + 0x58]
call fcn.00403ab0
mov ecx, dword [esp + 0x58]
push ecx
call fcn.0042f8dc
mov eax, dword [esp + 0xc0]
add esp, 4
mov dword [esp + 0xa4], 0xffffffff
test eax, eax
je 0x402b06
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, edi
jmp 0x402daa
mov ecx, dword [ebp + 0x7c]
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
push esi
push esi
push ecx
mov ecx, dword [ebp + 0x78]
push ecx
push eax
call edx
mov ebx, eax
cmp ebx, esi
jne 0x402d7f
push 0x20
call fcn.0042fde5
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x402b9f
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x30]
mov edx, dword [ebp + 0x34]
mov dword [esi + 4], ebx
mov dword [esi], vtable.NKZ::CInStreamWithSize.0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
mov dword [esi + 8], ebx
cmp eax, ebx
je 0x402b85
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov ecx, dword [esi + 8]
mov eax, dword [esp + 0x1c]
cmp ecx, ebx
je 0x402b82
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 8]
call ecx
mov eax, dword [esp + 0x1c]
mov dword [esi + 8], eax
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esp + 0x14], esi
jmp 0x402ba5
mov dword [esp + 0x14], ebx
mov esi, ebx
mov dword [esp + 0x24], esi
cmp esi, ebx
je 0x402bb5
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
push esi
call edx
push 0x40
mov byte [esp + 0xa8], 3
call fcn.0042fde5
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x402bea
mov eax, dword [esp + 0xb0]
push eax
lea eax, [esp + 0x5c]
mov ebx, edi
call fcn.00404820
mov esi, eax
mov dword [esp + 0x1c], esi
xor ebx, ebx
jmp 0x402bf0
mov dword [esp + 0x1c], ebx
mov esi, ebx
mov dword [esp + 0x2c], esi
cmp esi, ebx
je 0x402c00
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
push esi
call edx
mov dword [esp + 0x3c], vtable.NKZ::CBuffer_unsigned_char_.0
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov byte [esp + 0xa4], 5
cmp dword [ebp + 0x44], 1
jne 0x402c54
mov al, byte [ebp + 0x48]
test al, al
je 0x402c54
movzx edi, al
lea esi, [esp + 0x3c]
call fcn.00405410
movzx eax, byte [ebp + 0x48]
mov edx, dword [esp + 0x44]
push eax
lea ecx, [ebp + 0x49]
push ecx
push edx
call fcn.004335c0
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0xc8]
add esp, 0xc
xor ebx, ebx
movzx edx, byte [ebp + 0x42]
mov eax, dword [ebp + 0x30]
mov ecx, dword [ebp + 0x34]
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ecx
mov ecx, dword [ebp + 0x44]
lea eax, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x40]
push esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
movzx ebx, byte [ebp + 0x41]
mov dword [esp + 0x94], edx
mov edx, dword [esp + 0x20]
push edx
lea eax, [esp + 0x84]
push eax
mov dword [esp + 0x88], ebx
push ebp
mov ecx, edi
lea ebx, [esp + 0x34]
mov dword [esp + 0x94], 0
call fcn.00402320
mov ebx, eax
cmp ebx, 0xe00e0004
jne 0x402d46
mov ecx, dword [edi]
mov edx, dword [ecx + 0x14]
push eax
push edi
call edx
mov ebx, eax
mov eax, dword [esp + 0x44]
push eax
call fcn.00430546
add esp, 4
mov byte [esp + 0xa4], 3
test ebx, ebx
jne 0x402d5b
test esi, esi
je 0x402d01
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
push esi
call edx
mov byte [esp + 0xa4], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x402d19
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea esi, [esp + 0x58]
call fcn.00403ab0
mov eax, dword [esp + 0x58]
push eax
call fcn.0042f8dc
mov dword [esp + 0xa8], 0xffffffff
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
add esp, 4
push edi
call edx
xor eax, eax
jmp 0x402daa
mov eax, dword [esp + 0x44]
push eax
call fcn.00430546
add esp, 4
mov byte [esp + 0xa4], 3
test esi, esi
je 0x402d67
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
push esi
call edx
mov byte [esp + 0xa4], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x402d7f
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea esi, [esp + 0x58]
call fcn.00403ab0
mov eax, dword [esp + 0x58]
push eax
call fcn.0042f8dc
mov dword [esp + 0xa8], 0xffffffff
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
add esp, 4
push edi
call edx
mov eax, ebx
mov ecx, dword [esp + 0x9c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14