Function at 0x404d4d
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, eax
push dword [edi + 8]
push 0x1083
call fcn.00405c7a
push 0x101d
call fcn.00405c7a
and dword [ebp - 0x10], 0
and dword [ebp - 0xc], 0
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
push dword [edi + 8]
call fcn.00405f05
mov ebx, dword [ebp - 0xc]
mov esi, eax
test esi, esi
js 0x404dbd
mov eax, dword [ebx]
mov dword [edi + 0xc], eax
lea eax, [ebp - 0x10]
push eax
push dword [edi + 8]
call fcn.00405de5
mov ecx, dword [ebp - 0x10]
mov esi, eax
test esi, esi
js 0x404db3
mov eax, dword [ecx + 0x14]
mov dword [edi + 0x10], eax
xor esi, esi
test ecx, ecx
je 0x404dbd
push ecx
call fcn.00405b38
test ebx, ebx
je 0x404dc7
push ebx
call fcn.00405b38
test esi, esi
jns 0x404de8
push 0x1082
call fcn.00405c7a
pop ecx
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
call fcn.00405cc4
jmp 0x404f7a
xor ebx, ebx
cmp dword [edi + 0xc], ebx
je 0x404e00
push 0x1084
call fcn.00405c7a
xor eax, eax
jmp 0x404f86
push dword [edi + 8]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push 0x2a
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x34], eax
push 7
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0xc0100080
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x3c], 0x18
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], 0x40
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
call dword [sym.imp.ntdll.dll_NtOpenFile]
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
jns 0x404e6d
push 0x1086
call fcn.00405c7a
pop ecx
push ebx
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
call fcn.00405cc4
mov eax, ebx
jmp 0x404f87
mov ebx, dword [edi + 0x10]
mov eax, 0x200
cmp ebx, eax
jb 0x404e81
test ebx, 0x1ff
je 0x404e83
mov ebx, eax
lea eax, [ebx + ebx]
push eax
call fcn.00405b16
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x404eaa
push 0x1085
call fcn.00405c7a
pop ecx
mov esi, 0xc000009a
jmp 0x404f69
push 0
push ebx
push 0
push esi
call fcn.0040db80
mov edi, esi
test eax, eax
je 0x404ec4
sub edi, eax
add edi, ebx
mov dword [ebp - 0x10], edi
jmp 0x404ec7
mov dword [ebp - 0x10], esi
xor esi, esi
push esi
push esi
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x404ee1
push 0x1087
jmp 0x404f52
push esi
lea eax, [ebp - 8]
push eax
push ebx
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404f4d
cmp dword [ebp - 8], ebx
jne 0x404f4d
mov esi, dword [0x4151e0]
mov esi, dword [esi + 0xc]
push 0x6e
pop ecx
rep movsd dword es:[edi], dword [esi]
xor esi, esi
push esi
push esi
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x404eda
push esi
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp - 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404f46
cmp dword [ebp - 8], ebx
jne 0x404f46
push 0x108a
call fcn.00405c7a
mov esi, dword [ebp - 0xc]
pop ecx
jmp 0x404f69
push 0x1089
jmp 0x404f52
push 0x1088
call fcn.00405c7a
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405cc4
mov esi, 0xc0000001
push dword [ebp - 0x14]
call fcn.00405b38
push dword [ebp - 4]
call dword [sym.imp.ntdll.dll_NtClose]
push 0x101d
call fcn.00405c7a
mov eax, esi
pop ecx
pop edi
pop esi
pop ebx
leave
ret