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

Disassembly:
sub esp, 0x1e8
mov eax, dword [0x10139d00]
xor eax, esp
mov dword [esp + 0x1e4], eax
mov eax, dword [esp + 0x1ec]
push ebx
push ebp
push esi
xor ebx, ebx
mov esi, ecx
push edi
push esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x3c], eax
mov byte [esp + 0x194], 0
mov dword [esp + 0x195], ebx
mov dword [esp + 0x199], ebx
mov dword [esp + 0x19d], ebx
mov dword [esp + 0x1a1], ebx
mov byte [esp + 0x1f], bl
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 0x208]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
mov dword [esp + 0x64], edi
cmp edi, ebx
je 0x1000f957
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.___READ_IT___.txt
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
lea ecx, [esp + 0x194]
call fcn.1000ee40
test al, al
je 0x1000f94a
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1000f94a
lea edx, [esp + 0x10]
push edx
push esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push ebx
add ecx, 0xfffffff0
adc edx, 0xffffffff
push ebx
xor eax, eax
push edx
push ecx
push esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov byte [esp + 0x194], bl
mov dword [esp + 0x195], eax
mov dword [esp + 0x199], eax
mov dword [esp + 0x19d], eax
mov word [esp + 0x1a1], ax
mov byte [esp + 0x1a3], al
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [esp + 0x20]
push eax
push 0x10
lea ecx, [esp + 0x18c]
push ecx
push esi
mov dword [esp + 0x30], ebx
call ebp
mov ecx, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x1a5], eax
mov dword [esp + 0x1a9], eax
mov dword [esp + 0x1ad], eax
mov dword [esp + 0x1b1], eax
mov dword [esp + 0x1b5], eax
mov dword [esp + 0x1b9], eax
mov dword [esp + 0x1bd], eax
mov word [esp + 0x1c1], ax
mov byte [esp + 0x1c3], al
mov eax, dword [esp + 0x10]
push ebx
add eax, 0xffffffe0
push ebx
adc ecx, 0xffffffff
push ecx
push eax
push esi
mov byte [esp + 0x1b8], bl
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
call edi
push ebx
lea edx, [esp + 0x20]
push edx
push 0x20
lea eax, [esp + 0x1b0]
push eax
push esi
call ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push ebx
add eax, 0xfffffffc
push ebx
adc ecx, 0xffffffff
push ecx
push eax
push esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
call edi
mov dword [esp + 0x50], ebx
push ebx
lea ecx, [esp + 0x20]
push ecx
push 4
lea edx, [esp + 0x5c]
push edx
push esi
call ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push ebx
add eax, 0xfffffffe
push ebx
adc ecx, 0xffffffff
push ecx
push eax
push esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
call edi
push ebx
lea eax, [esp + 0x20]
push eax
push 2
lea ecx, [esp + 0x54]
push ecx
push esi
mov dword [esp + 0x5c], ebx
call ebp
cmp word [esp + 0x48], 1
mov dword [esp + 0x54], ebx
jne 0x1000f2ef
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push ebx
add eax, 0xfffffffe
push ebx
adc ecx, 0xffffffff
push ecx
push eax
push esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
call edi
push ebx
lea edx, [esp + 0x20]
push edx
push 2
lea eax, [esp + 0x60]
push eax
push esi
call ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push ebx
add eax, 0xfffffffc
push ebx
adc ecx, 0xffffffff
push ecx
push eax
push esi
mov dword [esp + 0x60], ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
call edi
push ebx
lea ecx, [esp + 0x20]
push ecx
push 4
lea edx, [esp + 0x58]
push edx
push esi
call ebp
push 0x2f
lea eax, [esp + 0x1c9]
push ebx
push eax
mov byte [esp + 0x1d0], bl
call fcn.100d4cc0
add esp, 0xc
push 0x2131
push 0x20
lea ecx, [esp + 0x1ac]
push ecx
push 0x11
lea ecx, [esp + 0x1d4]
lea edx, [esp + 0x1a0]
call fcn.10024d80
add esp, 0x10
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
push 0xec
lea edx, [esp + 0x70]
push ebx
push edx
mov byte [esp + 0x16c], bl
mov dword [esp + 0x16d], eax
mov dword [esp + 0x171], eax
mov dword [esp + 0x175], eax
mov word [esp + 0x179], ax
mov byte [esp + 0x17b], al
mov byte [esp + 0x17c], al
mov dword [esp + 0x17d], eax
mov dword [esp + 0x181], eax
mov dword [esp + 0x185], eax
mov word [esp + 0x189], ax
mov byte [esp + 0x18b], al
mov dword [esp + 0x74], ebx
call fcn.100d4cc0
add esp, 0xc
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x1c8]
push 0x100
push ecx
mov dword [esp + 0x164], ebx
call fcn.1006c040
add esp, 0xc
cmp word [esp + 0x48], bx
jne 0x1000f410
mov dword [esp + 0x40], 0x3c000
mov dword [esp + 0x44], ebx
jmp 0x1000f436
movzx edx, word [esp + 0x54]
mov dword [esp + 0x3c], edx
fild dword [esp + 0x3c]
fdiv qword [0x101306b8]
fild qword [esp + 0x10]
fmulp st(1)
call fcn.100d6226
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov ecx, dword [esp + 0x50]
mov eax, 0x24924925
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 2
lea edx, [eax*8]
sub edx, eax
sub ecx, edx
add ecx, 3
mov eax, ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x3c], eax
cdq
push edx
push eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x4c]
push eax
push ecx
mov dword [esp + 0x44], edx
call fcn.100e67b0
push ebx
push 0x10
push edx
push eax
call fcn.100e67b0
push ebx
push 0x10
push edx
push eax
call fcn.100d53f0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
cmp word [esp + 0x48], bx
jne 0x1000f4c8
push edx
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x38]
push edx
push eax
call fcn.100d53f0
mov ecx, dword [esp + 0x14]
cmp ecx, edx
jl 0x1000f4da
jg 0x1000f4c0
mov edx, dword [esp + 0x10]
cmp edx, eax
jbe 0x1000f4da
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
cmp edx, ebx
jg 0x1000f5a4
jl 0x1000f4da
cmp eax, ebx
ja 0x1000f5a4
mov eax, dword [esp + 0x38]
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x1000f939
cmp dword [esp + 0x14], ebx
jl 0x1000f582
jg 0x1000f510
cmp dword [esp + 0x10], ebx
jbe 0x1000f582
mov edi, edi
push ebx
lea ecx, [esp + 0x20]
push ecx
push 0x10
lea edx, [esp + 0x16c]
push edx
push esi
call ebp
push ebx
lea eax, [esp + 0x1e8]
push eax
lea ecx, [esp + 0x70]
push ecx
push 0x10
lea edx, [esp + 0x180]
push edx
lea eax, [esp + 0x174]
push eax
call fcn.1006c050
add esp, 0x18
push ebx
lea ecx, [esp + 0x20]
push ecx
push 0x10
lea edx, [esp + 0x17c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
sbb ecx, ebx
cmp ecx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
jg 0x1000f510
jl 0x1000f582
cmp eax, ebx
ja 0x1000f510
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x1000f59e
push 1
push ebx
neg eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
jmp 0x1000f92e
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x2c]
push ebx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
mov dword [esp + 0x38], ebp
cmp ebp, 0xffffffff
je 0x1000f939
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x34]
push edx
push eax
add ebx, 0xfffffffe
push ecx
mov dword [esp + 0x4c], ebx
call fcn.100d53f0
mov ecx, dword [esp + 0x10]
sub ecx, eax
mov eax, dword [esp + 0x14]
sbb eax, edx
mov dword [esp + 0x2c], eax
mov eax, ebx
cdq
push edx
push eax
mov eax, dword [esp + 0x34]
push eax
push ecx
call fcn.100e67b0
push 0
push 0
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x1c]
mov ebx, eax
mov eax, dword [esp + 0x18]
push edx
push eax
push ebp
mov dword [esp + 0x6c], ebx
call edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x3c], 0
mov dword [esp + 0x2c], 0
jle 0x1000f81f
jmp 0x1000f667
mov ebx, dword [esp + 0x58]
cmp dword [esp + 0x2c], 0
jle 0x1000f688
mov ecx, dword [esp + 0x5c]
push 1
push 0
push ecx
push ebx
push esi
call edi
mov edx, dword [esp + 0x5c]
push 1
push 0
push edx
push ebx
push ebp
call edi
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
test ebx, ebx
ja 0x1000f69c
test ebp, ebp
jbe 0x1000f808
push 1
lea edx, [esp + 0x34]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
push esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
call edi
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
sub ecx, ebp
sbb eax, ebx
add ecx, dword [esp + 0x20]
adc eax, dword [esp + 0x24]
cmp dword [esp + 0x14], eax
jb 0x1000f773
ja 0x1000f6de
cmp dword [esp + 0x10], ecx
jbe 0x1000f773
mov eax, ebp
sub eax, dword [esp + 0x30]
mov edx, ebx
sbb edx, dword [esp + 0x34]
sub eax, dword [esp + 0x20]
sbb edx, dword [esp + 0x24]
mov ecx, eax
add ecx, dword [esp + 0x10]
mov eax, edx
adc eax, dword [esp + 0x14]
cmp eax, ebx
ja 0x1000f711
jb 0x1000f708
cmp ecx, ebp
ja 0x1000f711
test eax, eax
ja 0x1000f711
cmp ecx, 0x10
jb 0x1000f773
test ebx, ebx
ja 0x1000f71a
cmp ebp, 0x10
jbe 0x1000f721
mov eax, 0x10
jmp 0x1000f723
mov eax, ebp
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x16c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test ebx, ebx
ja 0x1000f743
cmp ebp, 0x10
jbe 0x1000f74a
mov eax, 0x10
jmp 0x1000f74c
mov eax, ebp
push 0
lea ecx, [esp + 0x1e8]
push ecx
lea edx, [esp + 0x70]
push edx
push eax
lea eax, [esp + 0x180]
push eax
lea ecx, [esp + 0x174]
push ecx
call fcn.1006c050
jmp 0x1000f7cd
mov edi, ebp
sub edi, dword [esp + 0x20]
push 0
mov eax, edi
sub eax, dword [esp + 0x34]
lea edx, [esp + 0x20]
add eax, dword [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x16c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub edi, dword [esp + 0x30]
push 0
add edi, dword [esp + 0x14]
lea edx, [esp + 0x1e8]
push edx
lea eax, [esp + 0x70]
push eax
push edi
lea ecx, [esp + 0x180]
push ecx
lea edx, [esp + 0x174]
push edx
call fcn.1006c050
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [esp + 0x34]
add esp, 0x18
push 0
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x40]
push ecx
lea edx, [esp + 0x17c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub ebp, dword [esp + 0x1c]
sbb ebx, 0
test ebx, ebx
ja 0x1000f69c
jb 0x1000f808
test ebp, ebp
ja 0x1000f69c
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x38]
inc eax
cmp eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
jl 0x1000f663
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
push 0
push 0
sbb ecx, ebx
push ecx
push eax
push esi
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
call edi
lea ecx, [esp + 0x40]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x40]
sub eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
push 0
push 0
sbb ecx, ebx
push ecx
push eax
push ebp
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
call edi
mov edi, dword [esp + 0x20]
test ebx, ebx
ja 0x1000f886
test edi, edi
jbe 0x1000f910
test ebx, ebx
ja 0x1000f886
cmp edi, 0x10
jbe 0x1000f88d
mov eax, 0x10
jmp 0x1000f88f
mov eax, edi
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x16c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test ebx, ebx
ja 0x1000f8af
cmp edi, 0x10
jbe 0x1000f8b6
mov eax, 0x10
jmp 0x1000f8b8
mov eax, edi
push 0
lea ecx, [esp + 0x1e8]
push ecx
lea edx, [esp + 0x70]
push edx
push eax
lea eax, [esp + 0x180]
push eax
lea ecx, [esp + 0x174]
push ecx
call fcn.1006c050
mov eax, dword [esp + 0x34]
add esp, 0x18
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x17c]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub edi, dword [esp + 0x1c]
sbb ebx, 0
test ebx, ebx
ja 0x1000f886
jb 0x1000f910
test edi, edi
ja 0x1000f87d
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x1000f92d
push 1
push 0
neg eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x1b], 1
push str.Out__n
call fcn.100d1b69
mov edi, dword [esp + 0x68]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov al, byte [esp + 0x1b]
jmp 0x1000f959
mov al, bl
mov ecx, dword [esp + 0x1f4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100d0738
add esp, 0x1e8
ret 4