Function at 0x10160c4
Capabilities:
Copy file
Get file size
Write file on windows

Disassembly:
mov eax, 0x103e2ef
call fcn.0103cb58
sub esp, 0xe0
mov eax, dword [0x104a0fc]
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x7c], esi
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x60], eax
xor edi, edi
mov dword [ebp - 4], edi
cmp eax, edi
je 0x1016677
mov eax, dword [esi]
cmp eax, 1
jne 0x1016109
cmp dword [ebp + 8], edi
jl 0x1016112
cmp eax, 2
jne 0x1016677
cmp dword [esi + 0xc], 1
jne 0x1016122
mov ecx, esi
call fcn.01015fef
mov dword [esi + 0xc], edi
lea eax, [ebp - 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0xd4]
push eax
movzx eax, word [ebp - 0xce]
push eax
movzx eax, word [ebp - 0xd2]
push eax
push 0x1002fdc
lea eax, [ebp - 0x54]
push eax
mov edi, dword [sym.imp.msvcrt.dll_sprintf]
call edi
movzx eax, word [ebp - 0xc6]
push eax
movzx eax, word [ebp - 0xc8]
push eax
movzx eax, word [ebp - 0xca]
push eax
movzx eax, word [ebp - 0xcc]
push eax
push 0x1002fc8
lea eax, [ebp - 0x34]
push eax
call edi
add esp, 0x2c
lea ecx, [ebp - 0x58]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_void_
mov byte [ebp - 4], 1
xor edi, edi
mov dword [ebp - 0x70], edi
cmp dword [ebp + 8], edi
jge 0x1016309
push ebx
cmp dword [ebp + 0x1c], edi
je 0x1016264
lea ecx, [ebp - 0xc0]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov edi, eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x88]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov ebx, eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0xa8]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov dword [ebp - 0x98], eax
mov byte [ebp - 4], 4
push dword [ebp - 0x60]
lea ecx, [ebp - 0xc4]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_unsigned_short_int_const__
mov byte [ebp - 4], 5
push dword [ebp + 0x10]
push dword [edi]
push dword [ebp + 0x18]
push dword [ebx]
mov ecx, dword [ebp - 0x98]
push dword [ecx]
push dword [ebp + 0x1c]
push dword [eax]
push 0x1002f58
lea eax, [ebp - 0x58]
push eax
call sub.framedyn.dll_public:_void___cdecl_CHString::Format_unsigned_short_int_const__
add esp, 0x24
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xc4]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xa8]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x88]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xc0]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
jmp 0x10163d0
lea ecx, [ebp - 0xa4]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov esi, eax
mov byte [ebp - 4], 6
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x80]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov edi, eax
mov byte [ebp - 4], 7
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0xb8]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov ebx, eax
mov byte [ebp - 4], 8
push dword [ebp - 0x60]
lea ecx, [ebp - 0x90]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_unsigned_short_int_const__
mov byte [ebp - 4], 9
push dword [ebp + 0x10]
push dword [esi]
push dword [ebp + 0x18]
push dword [edi]
push dword [ebx]
push dword [ebp + 8]
push dword [eax]
push 0x1002ee8
lea eax, [ebp - 0x58]
push eax
call sub.framedyn.dll_public:_void___cdecl_CHString::Format_unsigned_short_int_const__
add esp, 0x24
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x90]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 7
lea ecx, [ebp - 0xb8]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x80]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa4]
jmp 0x10163c8
push 8
push 0x1002ed4
push dword [ebp - 0x60]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x10163d9
push ebx
lea ecx, [ebp - 0xbc]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov esi, eax
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0xb4]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov edi, eax
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0xac]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_char_const__
mov ebx, eax
mov byte [ebp - 4], 0xc
push dword [ebp - 0x60]
lea ecx, [ebp - 0xa0]
call sub.framedyn.dll_public:_void___thiscall_CHString::constructor_unsigned_short_int_const__
mov byte [ebp - 4], 0xd
push dword [ebp + 0x10]
push dword [esi]
push dword [ebp + 0x18]
push dword [edi]
push dword [ebx]
push dword [eax]
push 0x1002e70
lea eax, [ebp - 0x58]
push eax
call sub.framedyn.dll_public:_void___cdecl_CHString::Format_unsigned_short_int_const__
add esp, 0x20
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0xa0]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xac]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xb4]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xbc]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
mov esi, dword [ebp - 0x7c]
mov dword [ebp - 0x70], 1
xor edi, edi
push dword [ebp - 0x58]
lea ecx, [ebp - 0x6c]
call fcn.01007b57
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x6c]
cmp ecx, edi
je 0x10163f6
call fcn.01015c3b
jmp 0x10163f8
xor eax, eax
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x70], 1
jne 0x1016658
cmp eax, edi
je 0x1016658
mov dword [ebp - 0x8c], edi
lea eax, [ebp - 0xdc]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x10165e6
mov eax, dword [ebp - 0x64]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1016432
sub eax, edx
xor ecx, ecx
add eax, dword [ebp - 0xdc]
adc ecx, dword [ebp - 0xd8]
cmp ecx, dword [esi + 0x1c]
jl 0x10165e6
jg 0x101645d
cmp eax, dword [esi + 0x18]
jbe 0x10165e6
push dword [esi + 4]
lea ecx, [ebp - 0x68]
call fcn.01007b57
mov byte [ebp - 4], 0xf
push dword [esi + 4]
lea ecx, [ebp - 0x5c]
call fcn.01007b57
mov byte [ebp - 4], 0x10
push 0x1002e58
lea ecx, [ebp - 0x78]
call fcn.01007afe
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x68]
call fcn.01008489
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x78]
cmp ecx, edi
je 0x10164a8
call fcn.01008084
mov dword [ebp - 0x78], edi
push 0x1002e64
lea ecx, [ebp - 0x74]
call fcn.01007afe
mov byte [ebp - 4], 0x12
push eax
lea ecx, [ebp - 0x5c]
call fcn.01008489
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x74]
cmp ecx, edi
je 0x10164d5
call fcn.01008084
mov dword [ebp - 0x74], edi
mov eax, dword [ebp - 0x5c]
cmp eax, edi
je 0x10164e0
mov ecx, dword [eax]
jmp 0x10164e2
xor ecx, ecx
mov ebx, dword [ebp - 0x68]
cmp ebx, edi
je 0x10164ed
mov eax, dword [ebx]
jmp 0x10164ef
xor eax, eax
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1016543
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0xe0], edi
push 1
push 1
push 0
push 1
push 0xacba
call fcn.01032880
push edi
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
call esi
call fcn.01034112
push edi
call esi
mov dword [ebp - 0xb0], edi
push 0x1042d04
lea eax, [ebp - 0xb0]
jmp 0x10166cf
mov eax, dword [esi + 0x10]
cmp eax, edi
je 0x1016554
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10], edi
cmp ebx, edi
je 0x101655c
mov eax, dword [ebx]
jmp 0x101655e
xor eax, eax
push edi
push 0x80
push 2
push edi
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x10], eax
cmp eax, 0xffffffff
jne 0x10165c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp + 0x1c], edi
push edi
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
call esi
push 1
push 1
push 0
push 1
push 0xacbb
call fcn.01032880
push edi
call esi
call fcn.01034112
mov dword [ebp - 0x84], edi
push 0x1042d04
lea eax, [ebp - 0x84]
jmp 0x10166cf
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x5c]
cmp ecx, edi
je 0x10165d4
call fcn.01008084
mov dword [ebp - 0x5c], edi
mov byte [ebp - 4], 0xe
cmp ebx, edi
je 0x10165e6
mov ecx, ebx
call fcn.01008084
mov dword [ebp - 0x68], edi
mov esi, dword [esi + 0x10]
cmp esi, 0xffffffff
je 0x1016658
mov eax, dword [ebp - 0x64]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10165f4
sub eax, edx
push edi
lea ecx, [ebp - 0x8c]
push ecx
push eax
push dword [ebp - 0x64]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1016658
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0xec], edi
push 1
push 1
push 0
push 1
push 0xacba
call fcn.01032880
push edi
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
call esi
call fcn.01034112
push edi
call esi
mov dword [ebp - 0x94], edi
push 0x1042d04
lea eax, [ebp - 0x94]
jmp 0x10166cf
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x6c]
cmp ecx, edi
je 0x101666b
call fcn.01008084
mov dword [ebp - 0x6c], edi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x58]
call sub.framedyn.dll_public:_void___thiscall_CHString::destructor_void_
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.0103c70f
pop edi
pop esi
pop ebx
leave
ret 0x18
push eax
call sub.msvcrt.dll__CxxThrowException
int3