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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
jne 0x418033
push 1
mov dword [0x42e4e4], ebx
pop eax
jmp 0x41809f
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, ebx
je 0x41809d
cmp edi, 0xffffffff
je 0x41809d
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x418096
lea eax, [esi + 2]
push eax
call fcn.00415a3c
cmp eax, ebx
pop ecx
mov dword [ebp + 0xc], eax
je 0x418096
lea ecx, [ebp - 4]
push ebx
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4180a4
lea eax, [ebp + 0xc]
push eax
call fcn.00415a56
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 2
jbe 0x4180cd
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0xff
jne 0x4180cd
cmp byte [eax + 1], 0xfe
jne 0x4180cd
lea edi, [esi - 2]
lea ebx, [eax + 2]
shr edi, 1
and word [ebx + edi*2], 0
jmp 0x41814a
push dword [ebp + 8]
lea eax, [ebp - 0x410]
push 0x42b7bc
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x410]
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [ebp + 0xc]
push ebx
push ebx
push 0xffffffffffffffff
and byte [eax + esi], 0
push dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push ebx
call esi
mov edi, eax
lea eax, [edi + edi + 2]
push eax
call fcn.00415a3c
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x418130
lea eax, [ebp + 0xc]
push eax
call fcn.00415a56
pop ecx
jmp 0x41809d
push edi
push ebx
push 0xffffffffffffffff
push dword [ebp + 0xc]
push 0
push 0
call esi
lea eax, [ebp + 0xc]
push eax
call fcn.00415a56
pop ecx
mov dword [ebp + 0xc], ebx
push 0x14a0
call fcn.00415a49
test eax, eax
pop ecx
mov dword [0x42e4e4], eax
jne 0x418165
xor esi, esi
jmp 0x4182ba
test edi, edi
mov dword [0x42e4e0], 1
mov dword [0x42e4e8], 0xa
mov eax, ebx
jle 0x4182b7
mov dx, word [eax]
test dx, dx
je 0x4182b7
mov esi, eax
mov ecx, eax
sub ecx, ebx
sar ecx, 1
cmp edi, ecx
jle 0x4181b0
mov cx, word [esi]
cmp cx, 0xd
je 0x4181b0
cmp cx, 0xa
je 0x4181b0
inc esi
inc esi
mov ecx, esi
jmp 0x418193
movzx ecx, dx
cmp ecx, 0xa
je 0x418284
cmp ecx, 0xd
je 0x418284
cmp ecx, 0x5b
je 0x41826a
cmp dword [0x42e4e4], 0
je 0x418284
cmp eax, esi
je 0x418284
cmp dx, 0x23
lea ecx, [ebp - 0x208]
jne 0x41820c
cmp eax, esi
jae 0x4181ff
mov dx, word [eax]
inc eax
mov word [ecx], dx
inc eax
inc ecx
inc ecx
jmp 0x4181ef
and word [ecx], 0
push 1
push 0x42de00
jmp 0x418234
cmp eax, esi
jae 0x418222
mov dx, word [eax]
cmp dx, 0x3d
je 0x418222
inc eax
mov word [ecx], dx
inc eax
inc ecx
inc ecx
jmp 0x41820c
xor edx, edx
mov word [ecx], dx
cmp word [eax], 0x3d
jne 0x41822f
inc eax
inc eax
push edx
mov word [esi], dx
push eax
lea eax, [ebp - 0x208]
mov ecx, dword [0x42e4e4]
push eax
mov eax, dword [0x42e4e0]
imul eax, eax, 0x210
lea eax, [eax + ecx - 0x210]
push eax
call fcn.00418450
mov eax, esi
add esp, 0x10
sub eax, ebx
sar eax, 1
cmp edi, eax
jle 0x418284
inc esi
inc esi
jmp 0x418284
cmp eax, esi
je 0x418284
cmp word [esi - 2], 0x5d
jne 0x418284
and word [esi - 2], 0
add eax, 2
push eax
call fcn.004182cb
pop ecx
mov eax, esi
sub esi, ebx
sar esi, 1
cmp edi, esi
jle 0x4182a9
mov cx, word [eax]
cmp cx, 0xd
je 0x41829d
cmp cx, 0xa
jne 0x4182a9
inc eax
inc eax
mov ecx, eax
sub ecx, ebx
sar ecx, 1
cmp edi, ecx
jg 0x41828e
mov ecx, eax
sub ecx, ebx
sar ecx, 1
cmp edi, ecx
jg 0x418183
push 1
pop esi
lea eax, [ebp + 0xc]
push eax
call fcn.00415a56
pop ecx
mov eax, esi
jmp 0x41809f