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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push ebx
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4271a1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x426f81
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 0x40b6f0
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
test esi, esi
jle 0x4271c3
jmp 0x4271ba
cmp edi, 0x100000
jbe 0x426fad
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x40b760
call sub.msvcrt.dll_wprintf
mov dword [ebp - 8], 0x80004005
mov dword [esp], 0x436ac0
jmp 0x4271cb
push edi
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x426fce
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], 0x8007000e
jmp 0x4271c6
xor eax, eax
push eax
lea eax, [ebp - 4]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42701b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.msvcrt.dll_free]
push edi
push 0x40b7f0
call sub.msvcrt.dll_wprintf
add esp, 0xc
test edi, edi
jle 0x427013
movzx edi, di
or edi, 0x80070000
mov dword [ebp - 8], edi
jmp 0x4271c6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
cmp edi, eax
je 0x42704d
push ebx
call dword [sym.imp.msvcrt.dll_free]
push dword [ebp - 4]
push edi
push 0x40b858
call sub.msvcrt.dll_wprintf
add esp, 0x10
mov dword [ebp - 8], 0x80004005
jmp 0x4271c6
lea edi, [eax*2 + 0x20]
push edi
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x427075
push ebx
call dword [sym.imp.msvcrt.dll_free]
mov dword [ebp - 8], 0x8007000e
jmp 0x426fa1
push edi
xor eax, eax
push eax
push esi
call sub.msvcrt.dll_memset
mov ecx, str._root_
mov edi, esi
add esp, 0xc
mov edx, ecx
sub edi, ecx
movzx eax, word [edx]
mov word [edi + edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x42708d
lea edx, [ecx + 2]
xor edi, edi
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4270a1
push dword [ebp - 4]
sub ecx, edx
xor eax, eax
sar ecx, 1
lea edi, [esi + ecx*2]
push edi
push dword [ebp - 4]
push ebx
push eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4270de
push ebx
call dword [sym.imp.msvcrt.dll_free]
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop ecx
jmp 0x427041
mov eax, dword [ebp - 4]
mov ecx, str.__root_
lea edx, [edi + eax*2]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x4270e9
push ebx
call dword [sym.imp.msvcrt.dll_free]
sub esp, 0x18
mov ecx, esp
push esi
call fcn.0041208a
mov ecx, dword [ebp + 0xc]
call fcn.0042f8cf
test eax, eax
jns 0x42716e
xor ebx, ebx
push ebx
push ebx
push 2
push ebx
push 1
push 0xc0000000
push 0x40b904
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, eax
cmp edx, 0xffffffff
je 0x42715d
mov ecx, esi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x42713d
sub ecx, edi
lea eax, [ebp - 8]
push ebx
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x40b91c
push 0x80004005
call fcn.004241bf
pop ecx
pop ecx
sub esp, 0x1c
mov ecx, esp
push 0x437080
call fcn.0041208a
mov ecx, dword [ebp + 0xc]
call fcn.0042f7b1
test al, al
jne 0x42719a
push 0x40b954
push 0x80004005
call fcn.004241bf
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 0x40b688
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
test esi, esi
jle 0x4271c3
movzx esi, si
or esi, 0x80070000
mov dword [ebp - 8], esi
push 0x436ac0
lea eax, [ebp - 8]
push eax
call sub.msvcrt.dll__CxxThrowException
int3