Function at 0x1016f2f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x3c]
push ebx
push ebp
push esi
mov ecx, dword [eax + 0x20]
push edi
mov edi, dword [esp + 0x50]
xor ebx, ebx
push 1
push ebx
mov edx, dword [edi + 0x1c]
push ebx
push edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x5c], ecx
call fcn.10034a70
mov ebp, eax
mov eax, dword [edi + 0x20]
xor ecx, ecx
mov esi, edx
add ebp, eax
adc esi, ecx
mov edx, ebp
or edx, esi
je 0x1016f5d5
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
push 3
push 0x10000
call fcn.10152090
add esp, 0x10
test eax, eax
jne 0x1016f360
mov edx, dword [esp + 0x48]
pop edi
pop esi
pop ebp
mov byte [edx], 0x47
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x39]
mov edi, dword [esp + 0x34]
and eax, 0xff
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
xor ebx, ebx
mov bl, byte [edi]
mov dword [esp + 0x20], ebp
cdq
test esi, esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
ja 0x1016f3a0
cmp ebp, 0x10000
jbe 0x1016f4a1
jmp 0x1016f3a0
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
cmp byte [eax], 0
jne 0x1016f4d2
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push 0
push 0x640000
push ecx
push edx
call fcn.10034a70
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x24]
push ecx
push edx
push eax
call fcn.1003fef0
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
push edx
push eax
call fcn.10034a70
push 0
push 0x64
push edx
push eax
call fcn.1003fef0
mov cl, byte [esp + 0x38]
add al, bl
cmp al, cl
mov byte [edi], al
jb 0x1016f3fe
mov byte [edi], cl
mov edi, dword [esp + 0x14]
mov ecx, 0x4000
xor eax, eax
mov dword [esp + 0x50], 0
lea edx, [esp + 0x50]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x58]
push edx
push 0x10000
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1016f4f0
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
push edx
push eax
push 0x80
push ecx
call sym.ITEuDllvMgr.dll_VDR_WriteLUNData
add esp, 0x10
cmp eax, 1
jne 0x1016f50e
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x18]
add ecx, 0x80
add ebp, 0xffff0000
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x1c]
adc esi, 0xffffffff
add edx, eax
adc ecx, 0
mov dword [esp + 0x18], edx
test esi, esi
mov dword [esp + 0x1c], ecx
ja 0x1016f39c
jb 0x1016f49d
cmp ebp, 0x10000
ja 0x1016f39c
mov edi, dword [esp + 0x34]
mov edx, ebp
or edx, esi
je 0x1016f5c2
mov eax, dword [esp + 0x3c]
cmp byte [eax], 0
je 0x1016f52c
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x10]
push edx
mov byte [ecx], 0x36
call fcn.10034678
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x10]
push eax
mov byte [edx], 0x36
call fcn.10034678
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x10]
push edx
mov byte [ecx], 0x48
call fcn.10034678
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x10]
push ecx
mov byte [eax], 0x49
call fcn.10034678
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x54]
mov ecx, 0x4000
xor eax, eax
mov dword [esp + 0x50], 0
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x54]
push eax
push ebp
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1016f57a
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x10]
push ecx
mov byte [eax], 0x48
call fcn.10034678
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
add ebp, 0x1ff
push edx
push eax
shr ebp, 9
push ebp
push ecx
call sym.ITEuDllvMgr.dll_VDR_WriteLUNData
add esp, 0x10
cmp eax, 1
je 0x1016f5be
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x10]
push eax
mov byte [edx], 0x49
call fcn.10034678
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov cl, byte [esp + 0x38]
push edx
mov byte [edi], cl
call fcn.10034678
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret