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

Disassembly:
push 0xffffffffffffffff
push 0x516618
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x568e30]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x568e30]
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 0x40d091
mov eax, 0x80070057
jmp 0x40d87e
lea ecx, [esp + 0xcc]
call fcn.004012d0
lea ecx, [esp + 0xe8]
call fcn.004012d0
lea ecx, [esp + 0x104]
call fcn.004012d0
mov ecx, esi
lea edi, [esp + 0xcc]
mov dword [esp + 0x18c], ebx
call fcn.0040b6f0
push ecx
mov ecx, esp
call fcn.00402a50
lea ecx, [esp + 0xb4]
call fcn.00401a50
push ebx
push ebx
lea ecx, [esp + 0xb8]
call fcn.004019a0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d0f1
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0xb8]
call fcn.0040b080
mov byte [esp + 0x18c], 1
mov edi, dword [esp + 0x19c]
cmp edi, ebx
jne 0x40d14e
lea ecx, [esp + 0x19c]
push ecx
lea edx, [esp + 0xd0]
push edx
lea ecx, [esp + 0xb8]
call fcn.0040cb70
mov esi, eax
cmp esi, ebx
jne 0x40d1c5
mov edi, dword [esp + 0x19c]
push 0xc
call fcn.004b9963
add esp, 4
cmp eax, ebx
je 0x40d174
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 0x40d17a
mov dword [esp + 0x14], ebx
mov ebp, ebx
mov dword [esp + 0x84], ebp
cmp ebp, ebx
je 0x40d18e
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
lea ecx, [esp + 0xb0]
mov byte [esp + 0x18c], 2
call fcn.00401850
push eax
mov esi, ebp
call fcn.0040b2c0
mov esi, eax
cmp esi, ebx
je 0x40d1fc
mov byte [esp + 0x18c], 1
cmp ebp, ebx
je 0x40d1c5
mov edx, dword [ebp]
push ebp
mov eax, dword [edx + 8]
call eax
lea ecx, [esp + 0xb0]
call fcn.00401340
lea ecx, [esp + 0x104]
call fcn.00401340
lea ecx, [esp + 0xe8]
call fcn.00401340
lea ecx, [esp + 0xcc]
call fcn.00401340
mov eax, esi
jmp 0x40d87e
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 0x40d222
mov byte [esp + 0x18c], 1
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
jmp 0x40d1c5
push 0x18
call fcn.004b9963
add esp, 4
cmp eax, ebx
je 0x40d23f
push ebx
push edi
mov edi, ebp
mov esi, eax
call fcn.0040a8d0
mov edi, eax
jmp 0x40d241
xor edi, edi
mov dword [esp + 0x58], edi
cmp edi, ebx
je 0x40d251
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.004b8df0
add esp, 0xc
mov eax, edi
lea esi, [esp + 0x124]
call fcn.0040b650
mov esi, eax
cmp esi, ebx
je 0x40d2aa
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d294
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 0x40d1c5
mov ax, word [esp + 0x144]
movzx ecx, ax
mov dword [esp + 0x2c], ecx
cmp ax, bx
jne 0x40d31d
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d2d2
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.00401340
lea ecx, [esp + 0x104]
call fcn.00401340
lea ecx, [esp + 0xe8]
call fcn.00401340
lea ecx, [esp + 0xcc]
call fcn.00401340
mov eax, 0x80004005
jmp 0x40d87e
mov eax, dword [esp + 0x12e]
test al, 1
je 0x40d37d
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.0040ead0
mov esi, eax
add esp, 0x14
cmp esi, ebx
je 0x40d376
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d360
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 0x40d1c5
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.0040da60
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.0040d9d0
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 0x40d6cb
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.0040ead0
mov esi, eax
add esp, 0x14
cmp esi, ebx
jne 0x40d716
push 0x14
call fcn.004b9963
mov edi, dword [esp + 0x2c]
add esp, 4
cmp eax, ebx
je 0x40d495
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 0x40d497
xor ebp, ebp
mov dword [esp + 0x88], ebp
cmp ebp, ebx
je 0x40d4ab
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
mov byte [esp + 0x18c], 5
cmp dword [esp + 0x44], ebx
je 0x40d510
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.0040c320
mov esi, eax
cmp esi, ebx
je 0x40d53d
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d4f3
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
push edi
call fcn.004ba1cb
mov eax, dword [esp + 0x18]
add esp, 4
mov byte [esp + 0x18c], 1
mov edx, dword [eax]
push eax
jmp 0x40d1c0
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.0040c5a0
mov esi, eax
cmp esi, ebx
jne 0x40d73c
lea ecx, [esp + 0x8c]
call fcn.004012d0
lea edx, [esp + 0x8c]
push edx
lea eax, [esp + 0xd0]
push eax
mov byte [esp + 0x194], 6
call fcn.0040bac0
test eax, eax
je 0x40d754
push 0xc
call fcn.004b9963
add esp, 4
cmp eax, ebx
je 0x40d590
mov dword [eax + 4], ebx
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], 0xffffffff
mov edi, eax
jmp 0x40d592
xor edi, edi
mov dword [esp + 0x18], edi
cmp edi, ebx
je 0x40d5a2
mov ecx, dword [edi]
mov edx, dword [ecx + 4]
push edi
call edx
lea ecx, [esp + 0x8c]
mov byte [esp + 0x18c], 7
call fcn.00401850
push eax
mov esi, edi
call fcn.0040b2c0
test eax, eax
jne 0x40d77b
push 0x2a
lea eax, [esp + 0x154]
push ebx
push eax
call fcn.004b8df0
add esp, 0xc
mov eax, edi
lea esi, [esp + 0x150]
call fcn.0040b650
mov esi, eax
cmp esi, ebx
jne 0x40d7b7
movzx ecx, word [esp + 0x2c]
movzx edx, word [esp + 0x170]
inc ecx
cmp ecx, edx
jne 0x40d7f6
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.0040da60
lea ecx, [esp + 0x8c]
call fcn.00401340
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d685
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.004ba1cb
add esp, 4
call fcn.0040d9d0
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 0x40d428
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.00401340
lea ecx, [esp + 0x104]
call fcn.00401340
lea ecx, [esp + 0xe8]
call fcn.00401340
lea ecx, [esp + 0xcc]
call fcn.00401340
mov eax, edi
jmp 0x40d87e
mov eax, dword [esp + 0x28]
push eax
call fcn.004ba1cb
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 0x40d1c5
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d751
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
push edi
jmp 0x40d71b
lea ecx, [esp + 0x8c]
call fcn.00401340
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d775
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
push edi
jmp 0x40d830
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d78f
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
lea ecx, [esp + 0x8c]
call fcn.00401340
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d7b0
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
mov eax, dword [esp + 0x28]
push eax
jmp 0x40d830
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d7cb
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
lea ecx, [esp + 0x8c]
call fcn.00401340
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d7ec
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov edx, dword [esp + 0x28]
push edx
jmp 0x40d71b
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d80a
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
lea ecx, [esp + 0x8c]
call fcn.00401340
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d82b
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.004ba1cb
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.00401340
lea ecx, [esp + 0x104]
call fcn.00401340
lea ecx, [esp + 0xe8]
call fcn.00401340
lea ecx, [esp + 0xcc]
call fcn.00401340
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.004b8dd5
add esp, 0x17c
ret 0x1c