Function at 0x1016c770
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0x28]
sub esp, 0x10
test eax, eax
je 0x1016c784
mov eax, 1
add esp, 0x10
ret
push ebx
mov eax, dword [esp + 0x38]
push ebp
push esi
push edi
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x1016c9d9
mov ebx, dword [esp + 0x3c]
xor ebp, ebp
xor ecx, ecx
mov bp, word [ebx + 2]
mov cx, word [ebx]
imul ebp, ecx
push ebp
mov dword [esp + 0x20], ebp
call fcn.101d175d
mov edx, eax
mov eax, dword [ebx + 0x28]
xor ecx, ecx
mov edi, dword [ebx + 8]
mov eax, dword [eax]
mov cx, word [ebx]
sub eax, 2
mov esi, dword [ebx + 4]
imul eax, ecx
add eax, edi
add esp, 4
add eax, esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x44], eax
mov eax, dword [ebx + 0x1c]
test eax, eax
jbe 0x1016c805
dec eax
mov dword [ebx + 0x1c], eax
mov ecx, ebp
xor eax, eax
mov esi, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
push 0
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
push ebp
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], ebp
jb 0x1016c900
mov esi, dword [ebx + 0x2e]
mov ecx, dword [esp + 0x44]
add esi, ecx
xor ecx, ecx
mov cx, word [ebx + 2]
mov eax, ebp
xor edx, edx
mov dword [esp + 0x3c], 0
div ecx
mov edi, eax
cmp edi, 0x80
jbe 0x1016c8b8
mov ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
cmp byte [edx], 0
jne 0x1016c9c0
mov eax, dword [esp + 0x40]
push eax
push ebp
push 0x80
push esi
call sym.ITEuDllvMgr.dll_VDR_WriteLUNData
add esp, 0x10
cmp eax, 1
jne 0x1016c9c9
mov ecx, dword [esp + 0x3c]
sub edi, 0x80
add ecx, 0x10000
add ebp, 0x10000
add esi, 0x80
cmp edi, 0x80
mov dword [esp + 0x3c], ecx
ja 0x1016c862
mov ebp, dword [esp + 0x1c]
test edi, edi
je 0x1016c8e8
mov ecx, dword [esp + 0x2c]
cmp byte [ecx], 0
jne 0x1016c909
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
add ecx, eax
push edx
push ecx
push edi
push esi
call sym.ITEuDllvMgr.dll_VDR_WriteLUNData
add esp, 0x10
cmp eax, 1
jne 0x1016c9d2
mov eax, dword [esp + 0x44]
xor edx, edx
mov dx, word [ebx]
add eax, edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x44], eax
jmp 0x1016c805
mov eax, dword [esp + 0x2c]
cmp byte [eax], 0
je 0x1016c915
mov ecx, dword [esp + 0x38]
mov byte [ecx], 0x36
jmp 0x1016c9d9
mov esi, dword [ebx + 0x2e]
mov ecx, dword [esp + 0x44]
add esi, ecx
xor ecx, ecx
mov cx, word [ebx + 2]
mov eax, ebp
xor edx, edx
xor edi, edi
div ecx
mov ebx, eax
cmp ebx, 0x80
jbe 0x1016c97c
mov ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
cmp byte [edx], 0
jne 0x1016c909
mov eax, dword [esp + 0x40]
push eax
push ebp
push 0x80
push esi
call sym.ITEuDllvMgr.dll_VDR_WriteLUNData
add esp, 0x10
cmp eax, 1
jne 0x1016c9d2
sub ebx, 0x80
add edi, 0x10000
add ebp, 0x10000
add esi, 0x80
cmp ebx, 0x80
ja 0x1016c93a
test ebx, ebx
je 0x1016c9b6
mov eax, dword [esp + 0x2c]
cmp byte [eax], 0
je 0x1016c992
mov ecx, dword [esp + 0x38]
mov byte [ecx], 0x36
jmp 0x1016c9d9
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
add edi, eax
push edx
push edi
push ebx
push esi
call sym.ITEuDllvMgr.dll_VDR_WriteLUNData
add esp, 0x10
cmp eax, 1
je 0x1016c9b6
mov ecx, dword [esp + 0x38]
mov byte [ecx], 0x69
jmp 0x1016c9d9
mov dword [esp + 0x14], 1
jmp 0x1016c9d9
mov edx, dword [esp + 0x38]
mov byte [edx], 0x36
jmp 0x1016c9d9
mov eax, dword [esp + 0x38]
mov byte [eax], 0x69
jmp 0x1016c9d9
mov edx, dword [esp + 0x38]
mov byte [edx], 0x69
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x1016c9ec
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 4]
add esp, 0x10
ret