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

Disassembly:
push 0xffffffffffffffff
push 0x5166d8
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x568cb8]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x568cb8]
xor eax, esp
push eax
lea eax, [esp + 0x184]
mov dword fs:[0], eax
mov eax, dword [esp + 0x194]
mov esi, dword [esp + 0x198]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1a0]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x1a4]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x1a8]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1ac]
xor ebx, ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], eax
cmp esi, ebx
jne 0x40cf61
mov eax, 0x80070057
jmp 0x40d712
lea ecx, [esp + 0xcc]
call fcn.004012b0
lea ecx, [esp + 0xe8]
call fcn.004012b0
lea ecx, [esp + 0x104]
call fcn.004012b0
push esi
lea edi, [esp + 0xd0]
mov dword [esp + 0x190], ebx
call fcn.0040b610
push esi
lea ecx, [esp + 0xb4]
call fcn.004012e0
mov byte [esp + 0x18c], 1
mov edi, dword [esp + 0x19c]
cmp edi, ebx
jne 0x40cfe2
lea ecx, [esp + 0x19c]
push ecx
lea edx, [esp + 0xd0]
push edx
lea ecx, [esp + 0xb8]
call fcn.0040ca30
mov esi, eax
cmp esi, ebx
jne 0x40d059
mov edi, dword [esp + 0x19c]
push 0xc
call fcn.004bd0c6
add esp, 4
cmp eax, ebx
je 0x40d008
mov dword [eax + 4], ebx
mov ebp, eax
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], 0xffffffff
mov dword [esp + 0x14], ebp
jmp 0x40d00e
mov dword [esp + 0x14], ebx
mov ebp, ebx
mov dword [esp + 0x84], ebp
cmp ebp, ebx
je 0x40d022
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
lea ecx, [esp + 0xb0]
mov byte [esp + 0x18c], 2
call fcn.00401340
push eax
mov esi, ebp
call fcn.0040b1f0
mov esi, eax
cmp esi, ebx
je 0x40d090
mov byte [esp + 0x18c], 1
cmp ebp, ebx
je 0x40d059
mov edx, dword [ebp]
push ebp
mov eax, dword [edx + 8]
call eax
lea ecx, [esp + 0xb0]
call fcn.00401320
lea ecx, [esp + 0x104]
call fcn.00401320
lea ecx, [esp + 0xe8]
call fcn.00401320
lea ecx, [esp + 0xcc]
call fcn.00401320
mov eax, esi
jmp 0x40d712
mov ecx, dword [ebp]
mov edx, dword [ecx + 0x10]
push ebx
push ebx
push ebx
push edi
push ebp
call edx
mov esi, eax
cmp esi, ebx
je 0x40d0b6
mov byte [esp + 0x18c], 1
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
jmp 0x40d059
push 0x18
call fcn.004bd0c6
add esp, 4
cmp eax, ebx
je 0x40d0d3
push ebx
push edi
mov edi, ebp
mov esi, eax
call fcn.0040a890
mov edi, eax
jmp 0x40d0d5
xor edi, edi
mov dword [esp + 0x58], edi
cmp edi, ebx
je 0x40d0e5
mov edx, dword [edi]
mov eax, dword [edx + 4]
push edi
call eax
push 0x2a
lea ecx, [esp + 0x128]
push ebx
push ecx
mov byte [esp + 0x198], 3
call fcn.004b83b0
add esp, 0xc
mov eax, edi
lea esi, [esp + 0x124]
call fcn.0040b570
mov esi, eax
cmp esi, ebx
je 0x40d13e
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d128
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
mov byte [esp + 0x18c], 1
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
jmp 0x40d059
mov ax, word [esp + 0x144]
movzx ecx, ax
mov dword [esp + 0x2c], ecx
cmp ax, bx
jne 0x40d1b1
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d166
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
mov byte [esp + 0x18c], 1
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
lea ecx, [esp + 0xb0]
call fcn.00401320
lea ecx, [esp + 0x104]
call fcn.00401320
lea ecx, [esp + 0xe8]
call fcn.00401320
lea ecx, [esp + 0xcc]
call fcn.00401320
mov eax, 0x80004005
jmp 0x40d712
mov eax, dword [esp + 0x12e]
test al, 1
je 0x40d211
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
push ebx
push eax
push 2
push ecx
mov ecx, dword [esp + 0x4c]
push edi
call fcn.0040e970
mov esi, eax
add esp, 0x14
cmp esi, ebx
je 0x40d20a
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d1f4
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
mov byte [esp + 0x18c], 1
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
jmp 0x40d059
mov eax, dword [esp + 0x12e]
mov esi, dword [esp + 0x1c]
and eax, 2
mov dword [esp + 0x44], eax
xor eax, eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
lea eax, [esp + 0x8c]
mov dword [esp + 0x8c], edi
add esi, 8
push eax
mov edi, esi
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebx
call fcn.0040d890
mov edi, dword [esp + 0x146]
mov ebp, dword [esp + 0x14a]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
call fcn.0040d800
mov esi, dword [eax]
mov ecx, dword [esi]
mov edx, dword [ecx + 0x10]
push ebx
push ebx
push ebp
push edi
push esi
mov dword [esp + 0x2c], eax
call edx
mov edi, eax
cmp edi, ebx
jne 0x40d55f
mov dword [esp + 0x20], vtable.NKZ::CBuffer_unsigned_char_.0
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push 1
push eax
push 1
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x4c]
push esi
mov byte [esp + 0x1a0], 4
call fcn.0040e970
mov esi, eax
add esp, 0x14
cmp esi, ebx
jne 0x40d5aa
push 0x14
call fcn.004bd0c6
mov edi, dword [esp + 0x2c]
add esp, 4
cmp eax, ebx
je 0x40d329
mov edx, dword [esp + 0x24]
mov dword [eax + 4], ebx
mov dword [eax], vtable.NKZ::CInBufStream.0
mov dword [eax + 8], edi
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], ebx
mov ebp, eax
jmp 0x40d32b
xor ebp, ebp
mov dword [esp + 0x88], ebp
cmp ebp, ebx
je 0x40d33f
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
mov byte [esp + 0x18c], 5
cmp dword [esp + 0x44], ebx
je 0x40d3a4
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x64]
push ecx
push edx
mov edx, dword [esp + 0x2c]
mov ecx, ebp
call fcn.0040c1e0
mov esi, eax
cmp esi, ebx
je 0x40d3d1
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d387
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
push edi
call fcn.004b7eaf
mov eax, dword [esp + 0x18]
add esp, 4
mov byte [esp + 0x18c], 1
mov edx, dword [eax]
push eax
jmp 0x40d054
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x48]
push edx
push eax
push ebp
push ecx
lea ecx, [esp + 0x74]
call fcn.0040c460
mov esi, eax
cmp esi, ebx
jne 0x40d5d0
lea ecx, [esp + 0x8c]
call fcn.004012b0
lea edx, [esp + 0x8c]
push edx
lea eax, [esp + 0xd0]
push eax
mov byte [esp + 0x194], 6
call fcn.0040b9b0
test eax, eax
je 0x40d5e8
push 0xc
call fcn.004bd0c6
add esp, 4
cmp eax, ebx
je 0x40d424
mov dword [eax + 4], ebx
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], 0xffffffff
mov edi, eax
jmp 0x40d426
xor edi, edi
mov dword [esp + 0x18], edi
cmp edi, ebx
je 0x40d436
mov ecx, dword [edi]
mov edx, dword [ecx + 4]
push edi
call edx
lea ecx, [esp + 0x8c]
mov byte [esp + 0x18c], 7
call fcn.00401340
push eax
mov esi, edi
call fcn.0040b1f0
test eax, eax
jne 0x40d60f
push 0x2a
lea eax, [esp + 0x154]
push ebx
push eax
call fcn.004b83b0
add esp, 0xc
mov eax, edi
lea esi, [esp + 0x150]
call fcn.0040b570
mov esi, eax
cmp esi, ebx
jne 0x40d64b
movzx ecx, word [esp + 0x2c]
movzx edx, word [esp + 0x170]
inc ecx
cmp ecx, edx
jne 0x40d68a
mov eax, dword [esp + 0x172]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x176]
inc dword [esp + 0x2c]
mov dword [esp + 0x4c], eax
xor eax, eax
mov dword [esp + 0x64], eax
lea edx, [esp + 0x64]
mov dword [esp + 0x64], edi
add esi, 8
push edx
mov edi, esi
mov dword [esp + 0x54], ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x1c], ebx
call fcn.0040d890
lea ecx, [esp + 0x8c]
call fcn.00401320
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d519
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov byte [esp + 0x18c], 3
mov edx, dword [esp + 0x28]
push edx
mov dword [esp + 0x24], vtable.NKZ::CBuffer_unsigned_char_.0
call fcn.004b7eaf
add esp, 4
call fcn.0040d800
mov esi, dword [eax]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
push ebx
push ebx
push ecx
mov dword [esp + 0x24], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
push edx
push esi
call eax
mov edi, eax
cmp edi, ebx
je 0x40d2bc
mov eax, dword [esp + 0x14]
mov byte [esp + 0x18c], 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea ecx, [esp + 0xb0]
call fcn.00401320
lea ecx, [esp + 0x104]
call fcn.00401320
lea ecx, [esp + 0xe8]
call fcn.00401320
lea ecx, [esp + 0xcc]
call fcn.00401320
mov eax, edi
jmp 0x40d712
mov eax, dword [esp + 0x28]
push eax
call fcn.004b7eaf
mov eax, dword [esp + 0x18]
mov byte [esp + 0x190], 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
add esp, 4
push eax
call edx
jmp 0x40d059
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d5e5
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
push edi
jmp 0x40d5af
lea ecx, [esp + 0x8c]
call fcn.00401320
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d609
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
push edi
jmp 0x40d6c4
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d623
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
lea ecx, [esp + 0x8c]
call fcn.00401320
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d644
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
mov eax, dword [esp + 0x28]
push eax
jmp 0x40d6c4
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d65f
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
lea ecx, [esp + 0x8c]
call fcn.00401320
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d680
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov edx, dword [esp + 0x28]
push edx
jmp 0x40d5af
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d69e
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
lea ecx, [esp + 0x8c]
call fcn.00401320
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d6bf
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.004b7eaf
mov eax, dword [esp + 0x18]
mov byte [esp + 0x190], 1
mov edx, dword [eax]
add esp, 4
push eax
mov eax, dword [edx + 8]
call eax
lea ecx, [esp + 0xb0]
call fcn.00401320
lea ecx, [esp + 0x104]
call fcn.00401320
lea ecx, [esp + 0xe8]
call fcn.00401320
lea ecx, [esp + 0xcc]
call fcn.00401320
xor eax, eax
mov ecx, dword [esp + 0x184]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.004b8307
add esp, 0x17c
ret 0x1c