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

Disassembly:
push 0xffffffffffffffff
push 0x52b378
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x580ca0]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x580ca0]
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 0x40d0a1
mov eax, 0x80070057
jmp 0x40d852
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.0040b750
push esi
lea ecx, [esp + 0xb4]
call fcn.004012e0
mov byte [esp + 0x18c], 1
mov edi, dword [esp + 0x19c]
cmp edi, ebx
jne 0x40d122
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 0x40d199
mov edi, dword [esp + 0x19c]
push 0xc
call fcn.004bf084
add esp, 4
cmp eax, ebx
je 0x40d148
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 0x40d14e
mov dword [esp + 0x14], ebx
mov ebp, ebx
mov dword [esp + 0x84], ebp
cmp ebp, ebx
je 0x40d162
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.0040b330
mov esi, eax
cmp esi, ebx
je 0x40d1d0
mov byte [esp + 0x18c], 1
cmp ebp, ebx
je 0x40d199
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 0x40d852
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 0x40d1f6
mov byte [esp + 0x18c], 1
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
jmp 0x40d199
push 0x18
call fcn.004bf084
add esp, 4
cmp eax, ebx
je 0x40d213
push ebx
push edi
mov edi, ebp
mov esi, eax
call fcn.0040aa20
mov edi, eax
jmp 0x40d215
xor edi, edi
mov dword [esp + 0x58], edi
cmp edi, ebx
je 0x40d225
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.004ba280
add esp, 0xc
mov eax, edi
lea esi, [esp + 0x124]
call fcn.0040b6b0
mov esi, eax
cmp esi, ebx
je 0x40d27e
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d268
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 0x40d199
mov ax, word [esp + 0x144]
movzx ecx, ax
mov dword [esp + 0x2c], ecx
cmp ax, bx
jne 0x40d2f1
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d2a6
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 0x40d852
mov eax, dword [esp + 0x12e]
test al, 1
je 0x40d351
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.0040eb10
mov esi, eax
add esp, 0x14
cmp esi, ebx
je 0x40d34a
mov byte [esp + 0x18c], 2
cmp edi, ebx
je 0x40d334
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 0x40d199
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.0040d9d0
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.0040d940
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 0x40d69f
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.0040eb10
mov esi, eax
add esp, 0x14
cmp esi, ebx
jne 0x40d6ea
push 0x14
call fcn.004bf084
mov edi, dword [esp + 0x2c]
add esp, 4
cmp eax, ebx
je 0x40d469
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 0x40d46b
xor ebp, ebp
mov dword [esp + 0x88], ebp
cmp ebp, ebx
je 0x40d47f
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
mov byte [esp + 0x18c], 5
cmp dword [esp + 0x44], ebx
je 0x40d4e4
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 0x40d511
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d4c7
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
push edi
call fcn.004b9d83
mov eax, dword [esp + 0x18]
add esp, 4
mov byte [esp + 0x18c], 1
mov edx, dword [eax]
push eax
jmp 0x40d194
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 0x40d710
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.0040baf0
test eax, eax
je 0x40d728
push 0xc
call fcn.004bf084
add esp, 4
cmp eax, ebx
je 0x40d564
mov dword [eax + 4], ebx
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], 0xffffffff
mov edi, eax
jmp 0x40d566
xor edi, edi
mov dword [esp + 0x18], edi
cmp edi, ebx
je 0x40d576
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.0040b330
test eax, eax
jne 0x40d74f
push 0x2a
lea eax, [esp + 0x154]
push ebx
push eax
call fcn.004ba280
add esp, 0xc
mov eax, edi
lea esi, [esp + 0x150]
call fcn.0040b6b0
mov esi, eax
cmp esi, ebx
jne 0x40d78b
movzx ecx, word [esp + 0x2c]
movzx edx, word [esp + 0x170]
inc ecx
cmp ecx, edx
jne 0x40d7ca
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.0040d9d0
lea ecx, [esp + 0x8c]
call fcn.00401320
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d659
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.004b9d83
add esp, 4
call fcn.0040d940
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 0x40d3fc
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 0x40d852
mov eax, dword [esp + 0x28]
push eax
call fcn.004b9d83
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 0x40d199
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d725
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
push edi
jmp 0x40d6ef
lea ecx, [esp + 0x8c]
call fcn.00401320
mov byte [esp + 0x18c], 4
cmp ebp, ebx
je 0x40d749
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
push edi
jmp 0x40d804
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d763
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 0x40d784
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
mov eax, dword [esp + 0x28]
push eax
jmp 0x40d804
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d79f
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 0x40d7c0
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov edx, dword [esp + 0x28]
push edx
jmp 0x40d6ef
mov byte [esp + 0x18c], 6
cmp edi, ebx
je 0x40d7de
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 0x40d7ff
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.004b9d83
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.004ba1db
add esp, 0x17c
ret 0x1c