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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x439110
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x450068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x6c], edx
mov esi, ecx
lea eax, [ebp - 0x61]
mov byte [ebp - 0x62], 0
push eax
lea edx, [ebp - 0x62]
mov byte [ebp - 0x61], 0
call fcn.00410490
add esp, 4
test al, al
jne 0x410654
mov eax, 1
jmp 0x410b96
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4106db
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff4
call edi
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp eax, 0xffffffff
je 0x41068e
push 0xc
push eax
call esi
push str._ERROR_
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 8
push 0xfffffffffffffff4
call edi
cmp eax, 0xffffffff
je 0x4106b4
push 7
push eax
call esi
push str.Failed_to_open_input_file.
push 0x448f94
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 0xc
mov eax, 2
jmp 0x410b96
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x68], eax
cmp eax, 0xffffffff
jne 0x41075c
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp eax, 0xffffffff
je 0x410704
push 0xc
push eax
call esi
push str._ERROR_
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
je 0x41072e
push 7
push eax
call esi
push str.Failed_to_get_file_size.
push 0x448f94
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 3
jmp 0x410b96
push ecx
xorps xmm0, xmm0
mov dword [ebp - 0x58], 0
push eax
lea ecx, [ebp - 0x60]
movq qword [ebp - 0x60], xmm0
call fcn.00410c20
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x2c], 0
test edi, edi
je 0x4107a6
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x68]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4107a6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x68]
cmp dword [ebp - 0x2c], eax
je 0x410817
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp eax, 0xffffffff
je 0x4107c6
push 0xc
push eax
call edi
push str._ERROR_
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
je 0x4107f0
push 7
push eax
call edi
push str.Failed_to_read_file.
push 0x448f94
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 0xc
mov edi, 4
jmp 0x410b67
lea edi, [esi + 2]
lea esi, [eax - 2]
shr esi, 1
cmp byte [ebp - 0x61], 0
je 0x4108a4
xor edx, edx
test esi, esi
je 0x4108a4
cmp esi, 0x20
jb 0x41088f
cmp dword [0x451804], 2
jl 0x41088f
mov ecx, esi
lea eax, [edi + 0x20]
and ecx, 0xffffffe0
movups xmm0, xmmword [eax - 0x20]
add edx, 0x20
lea eax, [eax + 0x40]
pshufb xmm0, xmmword [0x44b2b0]
movups xmmword [eax - 0x60], xmm0
movups xmm0, xmmword [eax - 0x50]
pshufb xmm0, xmmword [0x44b2b0]
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
pshufb xmm0, xmmword [0x44b2b0]
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [eax - 0x30]
pshufb xmm0, xmmword [0x44b2b0]
movups xmmword [eax - 0x30], xmm0
cmp edx, ecx
jb 0x410841
cmp edx, esi
jae 0x4108a4
mov ax, word [edi + edx*2]
mov ch, al
mov cl, ah
mov word [edi + edx*2], cx
inc edx
cmp edx, esi
jb 0x410893
push esi
xor eax, eax
mov dword [ebp - 0x34], 0
push edi
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
call fcn.00402cf0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
push 0
push 0
push 0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x30], 8
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmovae eax, dword [ebp - 0x44]
push 0
push dword [ebp - 0x34]
push eax
push 0
push 0xfde9
call edi
mov esi, eax
test esi, esi
jle 0x410a72
push ecx
xorps xmm0, xmm0
mov dword [ebp - 0x48], 0
push esi
lea ecx, [ebp - 0x50]
movq qword [ebp - 0x50], xmm0
call fcn.00410c20
push 0
push 0
push esi
mov byte [ebp - 4], 3
lea eax, [ebp - 0x44]
push dword [ebp - 0x50]
cmp dword [ebp - 0x30], 8
push dword [ebp - 0x34]
cmovae eax, dword [ebp - 0x44]
push eax
push 0
push 0xfde9
call edi
mov esi, dword [ebp - 0x14]
lea edi, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x28]
cmp esi, 0x10
lea ecx, [ebp - 0x28]
cmovae edi, edx
add edi, dword [ebp - 0x18]
cmp esi, 0x10
cmovae eax, edx
sub edi, eax
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x4c]
cmp esi, 0x10
mov esi, dword [ebp - 0x50]
cmovae ecx, edx
sub eax, esi
push eax
mov eax, dword [ebp - 0x68]
push esi
sub eax, ecx
lea ecx, [ebp - 0x28]
push edi
push eax
call fcn.00410cc0
test esi, esi
je 0x4109b8
mov ecx, dword [ebp - 0x48]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x4109ae
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410bb1
push ecx
push esi
call fcn.0041aec9
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x410a3d
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff4
call edi
cmp eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
je 0x4109f3
push 0xc
push eax
call esi
push str._ERROR_
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 8
push 0xfffffffffffffff4
call edi
cmp eax, 0xffffffff
je 0x410a19
push 7
push eax
call esi
push str.Failed_to_open_output_file.
push 0x448f94
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
mov edi, 6
jmp 0x410ad1
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x54]
push 0
push ecx
push dword [ebp - 0x18]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x54]
xor ecx, ecx
cmp eax, dword [ebp - 0x18]
mov edi, 0xa
cmove edi, ecx
jmp 0x410ad4
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff4
call edi
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp eax, 0xffffffff
je 0x410a8c
push 0xc
push eax
call esi
push str._ERROR_
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 8
push 0xfffffffffffffff4
call edi
cmp eax, 0xffffffff
je 0x410ab2
push 7
push eax
call esi
push str.Failed_to_convert_UTF_16_to_UTF_8.
push 0x448f94
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
mov edi, 5
add esp, 0xc
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x410b08
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x410afe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410bb6
push edx
push ecx
call fcn.0041aec9
add esp, 8
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp edx, 8
jb 0x410b50
mov ecx, dword [ebp - 0x44]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x410b46
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410bbb
push edx
push ecx
call fcn.0041aec9
add esp, 8
mov esi, dword [ebp - 0x60]
xor eax, eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
test esi, esi
je 0x410b94
mov ecx, dword [ebp - 0x58]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x410b8a
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410bc0
push ecx
push esi
call fcn.0041aec9
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041aaeb
mov esp, ebp
pop ebp
ret
call fcn.00422e9e
call fcn.00422e9e
call fcn.00422e9e
call fcn.00422e9e
int3