Function at 0x1006ce70
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x58], ecx
xor ecx, ecx
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], edx
mov dword [edi], 0
mov dword [ebp - 0x4c], ecx
mov byte [ebp - 0x45], cl
cmp byte [esi], 0
mov ecx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
je 0x1006ced1
cmp byte [esi + 1], 0
je 0x1006cecd
push 1
push 0
push 0
push dword [esi + 4]
call ecx
sub eax, dword [esi + 0xc]
mov ecx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x1006ced4
xor eax, eax
jmp 0x1006ced4
mov eax, dword [esi + 0x20]
inc eax
cmp eax, dword [esi + 0x10]
ja 0x1006d623
cmp byte [esi], 0
je 0x1006cefd
cmp byte [esi + 1], 0
je 0x1006cef9
push 1
push 0
push 0
push dword [esi + 4]
call ecx
sub eax, dword [esi + 0xc]
jmp 0x1006cf00
xor eax, eax
jmp 0x1006cf00
mov eax, dword [esi + 0x20]
add eax, 4
cmp eax, dword [esi + 0x10]
ja 0x1006d5e9
cmp byte [esi], 0
je 0x1006cf34
cmp byte [esi + 1], 0
je 0x1006cf2b
push 1
push 0
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub eax, dword [esi + 0xc]
jmp 0x1006cf37
mov dword [ebp - 0x4c], 0
jmp 0x1006cf3a
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x4c], eax
cmp byte [esi], 0
mov edi, 4
je 0x1006cf65
push 0
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x54]
push edi
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006cf60
mov byte [esi + 8], 1
mov edi, dword [ebp - 0x28]
jmp 0x1006cf8c
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
lea eax, [ecx + 4]
cmp eax, edx
jbe 0x1006cf76
mov edi, edx
sub edi, ecx
mov eax, dword [esi + 0x18]
add eax, ecx
push edi
push eax
mov eax, dword [ebp - 0x54]
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
add dword [esi + 0x20], edi
shr edi, 2
cmp edi, 1
jne 0x1006d5ac
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
cmp eax, 0x2014b50
je 0x1006d573
cmp eax, 0x4034b50
je 0x1006d00d
cmp eax, 0x6054b50
je 0x1006d573
cmp dword [ebp - 0x4c], 0
je 0x1006d379
cmp byte [ebp - 0x45], 0
mov edi, dword [ebp - 0x50]
je 0x1006d33e
lea eax, [ebp - 0x3c]
push eax
push ecx
mov ecx, dword [ebp - 0x58]
push edi
push esi
call sym.HncFoundation.dll_private:_bool___thiscall_CRepairZip::SearchDataDescriptor_struct_CRepairZip::LUFILE_type___int___unsigned_int___struct_zip_data_descriptor_pack_s__
test al, al
je 0x1006d33b
mov ecx, dword [ebx + 4]
cmp dword [ebx], ecx
je 0x1006d004
mov ecx, dword [ecx - 4]
mov eax, dword [ebp - 0x3c]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x38]
mov dword [ecx + 0x10], eax
mov eax, dword [ebp - 0x34]
mov dword [ecx + 0x14], eax
mov byte [ebp - 0x45], 0
jmp 0x1006cea6
cmp byte [esi], 0
mov edi, 0x1a
je 0x1006d03d
push 0
lea eax, [ebp - 0x30]
push eax
push edi
lea eax, [ebp - 0x24]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006d033
mov byte [esi + 8], 1
mov eax, 0x4ec4ec4f
mul dword [ebp - 0x30]
jmp 0x1006d06b
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
lea eax, [ecx + 0x1a]
cmp eax, edx
jbe 0x1006d04e
mov edi, edx
sub edi, ecx
mov eax, dword [esi + 0x18]
add eax, ecx
push edi
push eax
lea eax, [ebp - 0x24]
push eax
call sub.MSVCR120.dll_memcpy
add dword [esi + 0x20], edi
mov eax, 0x4ec4ec4f
add esp, 0xc
mul edi
shr edx, 3
cmp edx, 1
jne 0x1006d515
push 0x3c
call dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
mov edi, eax
add esp, 4
test edi, edi
je 0x1006d379
push 0x3c
push 0
push edi
call sub.MSVCR120.dll_memset
push 0x2a
push 0
push edi
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0
call sub.MSVCR120.dll_memset
push 0x2a
push 0
push edi
call sub.MSVCR120.dll_memset
movzx eax, word [ebp - 0x24]
add esp, 0x24
mov word [edi + 2], ax
movzx eax, word [ebp - 0x22]
mov word [edi + 4], ax
movzx eax, word [ebp - 0x20]
mov word [edi + 6], ax
movzx eax, word [ebp - 0x1e]
mov word [edi + 8], ax
movzx eax, word [ebp - 0x1c]
mov word [edi + 0xa], ax
mov eax, dword [ebp - 0x1a]
mov dword [edi + 0xc], eax
cmp dword [edi + 0xc], 0
mov eax, dword [ebp - 0x16]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x12]
mov dword [edi + 0x14], eax
movzx eax, word [ebp - 0xe]
mov word [edi + 0x18], ax
movzx eax, word [ebp - 0xc]
mov word [edi + 0x1a], ax
je 0x1006d11f
mov byte [ebp - 0x45], 0
jmp 0x1006d133
cmp dword [edi + 0x10], 0
je 0x1006d12b
mov byte [ebp - 0x45], 0
jmp 0x1006d133
cmp dword [edi + 0x14], 0
sete byte [ebp - 0x45]
cmp word [ebp - 0xe], 0
je 0x1006d1cb
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x1006d14f
push eax
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
movzx eax, word [edi + 0x18]
push eax
call fcn.1009427d
mov edx, eax
add esp, 4
mov dword [edi + 0x2c], edx
cmp byte [esi], 0
movzx eax, word [ebp - 0xe]
mov dword [ebp - 0x40], edx
mov ecx, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
je 0x1006d193
push 0
lea ecx, [ebp - 0x2c]
push ecx
push eax
push edx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006d18e
mov byte [esi + 8], 1
mov eax, dword [ebp - 0x2c]
jmp 0x1006d1bd
mov edx, dword [esi + 0x20]
add eax, edx
cmp eax, dword [esi + 0x1c]
jbe 0x1006d1a5
mov ecx, dword [esi + 0x1c]
sub ecx, edx
mov dword [ebp - 0x5c], ecx
push ecx
mov ecx, dword [esi + 0x18]
add ecx, edx
push ecx
push dword [ebp - 0x40]
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp - 0x5c]
add esp, 0xc
add dword [esi + 0x20], eax
xor edx, edx
div dword [ebp - 0x60]
cmp eax, 1
jne 0x1006d397
cmp word [ebp - 0xc], 0
je 0x1006d263
mov eax, dword [edi + 0x30]
test eax, eax
je 0x1006d1e7
push eax
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
movzx eax, word [edi + 0x1a]
push eax
call fcn.1009427d
mov edx, eax
add esp, 4
mov dword [edi + 0x30], edx
cmp byte [esi], 0
movzx eax, word [ebp - 0xc]
mov dword [ebp - 0x40], edx
mov ecx, eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x60], eax
je 0x1006d22b
push 0
lea ecx, [ebp - 8]
push ecx
push eax
push edx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006d226
mov byte [esi + 8], 1
mov eax, dword [ebp - 8]
jmp 0x1006d255
mov edx, dword [esi + 0x20]
add eax, edx
cmp eax, dword [esi + 0x1c]
jbe 0x1006d23d
mov ecx, dword [esi + 0x1c]
sub ecx, edx
mov dword [ebp - 0x60], ecx
push ecx
mov ecx, dword [esi + 0x18]
add ecx, edx
push ecx
push dword [ebp - 0x40]
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp - 0x60]
add esp, 0xc
add dword [esi + 0x20], eax
xor edx, edx
div dword [ebp - 0x5c]
cmp eax, 1
jne 0x1006d397
mov edx, dword [ebp - 0x4c]
mov eax, 1
mov word [edi + 0x1e], ax
mov dword [edi + 0x26], edx
mov ax, word [ebp - 0x24]
mov word [edi], ax
cmp byte [esi], 0
mov ecx, dword [ebp - 0x16]
mov dword [ebp - 0x40], ecx
je 0x1006d2a5
cmp byte [esi + 1], 0
je 0x1006d2a1
push 1
push 0
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub eax, dword [esi + 0xc]
mov edx, dword [ebp - 0x4c]
jmp 0x1006d2a8
xor eax, eax
jmp 0x1006d2a8
mov eax, dword [esi + 0x20]
add eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x16]
cmp eax, dword [esi + 0x10]
ja 0x1006d407
cmp byte [esi], 0
je 0x1006d2d2
cmp byte [esi + 1], 0
je 0x1006d2d5
push 1
push 0
push ecx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x1006d2d5
add dword [esi + 0x20], ecx
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], edi
cmp ecx, eax
jae 0x1006d319
mov ecx, dword [ebx]
lea edx, [ebp - 0x44]
cmp ecx, edx
ja 0x1006d319
mov edi, edx
sub edi, ecx
sar edi, 2
cmp eax, dword [ebx + 8]
jne 0x1006d2ff
push ecx
mov ecx, ebx
call fcn.1002ee90
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x1006d30d
mov eax, dword [ebx]
mov eax, dword [eax + edi*4]
mov dword [ecx], eax
add dword [ebx + 4], 4
mov edi, dword [ebp - 0x50]
jmp 0x1006cea6
cmp eax, dword [ebx + 8]
jne 0x1006d326
push ecx
mov ecx, ebx
call fcn.1002ee90
mov eax, dword [ebx + 4]
test eax, eax
je 0x1006d32f
mov dword [eax], edi
add dword [ebx + 4], 4
mov edi, dword [ebp - 0x50]
jmp 0x1006cea6
mov ecx, dword [ebp - 0x54]
mov dword [ecx], 0
cmp byte [esi], 0
je 0x1006d36b
cmp byte [esi + 1], 0
je 0x1006d371
mov eax, dword [esi + 0xc]
add eax, dword [ebp - 0x4c]
push 0
push 0
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
or dword [edi], 8
jmp 0x1006d62c
mov ecx, dword [ebp - 0x4c]
mov dword [esi + 0x20], ecx
or dword [edi], 8
jmp 0x1006d62c
mov eax, dword [ebp - 0x50]
pop edi
pop esi
pop ebx
mov dword [eax], 0xffff
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x50]
or dword [eax], 1
mov eax, dword [ebp - 0x54]
mov dword [eax], 0
cmp byte [esi], 0
je 0x1006d3e4
cmp byte [esi + 1], 0
je 0x1006d3ea
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 0x4c]
add eax, ecx
push 0
push 0
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ecx
mov ecx, edi
call fcn.1006bba0
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 0x4c]
mov dword [esi + 0x20], ecx
push ecx
mov ecx, edi
call fcn.1006bba0
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x50]
or dword [eax], 4
cmp word [ebp - 0x20], 0
jne 0x1006d4da
mov ecx, dword [ebp - 0x58]
push esi
call sym.HncFoundation.dll_private:_long_int___thiscall_CRepairZip::luftell_struct_CRepairZip::LUFILE_type__
mov ecx, dword [esi + 0x10]
sub ecx, eax
mov eax, dword [ebp - 0x16]
sub eax, ecx
mov dword [ebp - 0x58], ecx
push eax
mov dword [ebp - 0x4c], eax
call fcn.1009427d
mov ecx, eax
add esp, 4
mov dword [ebp - 0x54], ecx
test ecx, ecx
je 0x1006d4b4
cmp byte [esi], 0
je 0x1006d464
cmp byte [esi + 1], 0
je 0x1006d46a
mov eax, dword [ebp - 0x58]
push 1
push 0
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x54]
jmp 0x1006d46a
mov eax, dword [ebp - 0x58]
add dword [esi + 0x20], eax
push dword [ebp - 0x4c]
push 0
push ecx
call sub.MSVCR120.dll_memset
add esp, 0xc
lea eax, [ebp - 8]
push 0
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x54]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x54]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
mov eax, dword [ebp - 0x4c]
add esp, 4
cmp eax, dword [ebp - 8]
jne 0x1006d4b4
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], edi
push eax
mov ecx, ebx
call fcn.1002ee20
jmp 0x1006d62c
mov eax, dword [ebp - 0x50]
push ecx
mov ecx, edi
or dword [eax], 0x8000
call fcn.1006bba0
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
cmp byte [esi], 0
je 0x1006d505
cmp byte [esi + 1], 0
je 0x1006d508
mov eax, dword [esi + 0xc]
push 0
push 0
add eax, edx
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ecx
mov ecx, edi
call fcn.1006bba0
jmp 0x1006d62c
mov dword [esi + 0x20], edx
push ecx
mov ecx, edi
call fcn.1006bba0
jmp 0x1006d62c
mov eax, dword [ebp - 0x50]
or dword [eax], 1
mov eax, dword [ebp - 0x54]
mov dword [eax], 0
cmp byte [esi], 0
je 0x1006d558
cmp byte [esi + 1], 0
je 0x1006d55e
mov eax, dword [esi + 0xc]
add eax, dword [ebp - 0x4c]
push 0
push 0
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 0x4c]
mov dword [esi + 0x20], ecx
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
mov dword [ecx], 0
cmp byte [esi], 0
je 0x1006d5a1
cmp byte [esi + 1], 0
je 0x1006d62c
mov eax, dword [esi + 0xc]
add eax, dword [ebp - 0x4c]
push 0
push 0
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x1006d62c
mov ecx, dword [ebp - 0x4c]
mov dword [esi + 0x20], ecx
jmp 0x1006d62c
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x50]
test ecx, ecx
jne 0x1006d5d1
pop edi
pop esi
mov dword [eax], 0xffff
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
or dword [eax], 1
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
jne 0x1006d60b
mov dword [edi], 0xffff
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
or dword [edi], 1
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x54]
mov dword [eax], 0
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0x10