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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x47c
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_CreateFileA]
xor ebx, ebx
push ebx
mov esi, 0x80
push esi
push 3
push ebx
push 3
push connect
push dword [ebp + 8]
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x405045
cmp eax, ebx
je 0x405045
push ebx
push esi
push 2
push ebx
push 3
push 0x40000000
push dword [ebp + 0xc]
call edi
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x405040
cmp eax, ebx
je 0x405040
xor eax, eax
push 7
pop ecx
push 0xb
mov byte [ebp - 0x2c], bl
mov byte [ebp - 0x2b], bl
lea edi, [ebp - 0x48]
rep stosd dword es:[edi], eax
pop ecx
mov byte [ebp - 0x14], bl
mov byte [ebp - 0x13], bl
mov byte [ebp - 0x4c], bl
mov byte [ebp - 0x4b], bl
lea edi, [ebp - 0x78]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x3e]
push eax
mov dword [ebp - 0x48], 0x4034b50
mov word [ebp - 0x44], 0xa
mov word [ebp - 0x72], 0xa
mov word [ebp - 0x42], bx
mov word [ebp - 0x70], bx
mov word [ebp - 0x40], bx
mov word [ebp - 0x6e], bx
call fcn.00404d16
mov ax, word [ebp - 0x3e]
push dword [ebp - 0xc]
mov word [ebp - 0x6c], ax
mov ax, word [ebp - 0x3c]
mov word [ebp - 0x6a], ax
call fcn.00404d9b
mov edi, dword [sym.imp.KERNEL32.DLL_GetFileSize]
add esp, 0xc
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x3a], eax
mov dword [ebp - 0x68], eax
call edi
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x36], eax
mov dword [ebp - 0x64], eax
call edi
push dword [ebp + 0x10]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov dword [ebp - 0x32], eax
mov dword [ebp - 0x60], eax
call esi
mov edi, dword [sym.imp.KERNEL32.DLL_WriteFile]
push ebx
mov word [ebp - 0x2e], ax
mov word [ebp - 0x5c], ax
lea eax, [ebp - 4]
push eax
push 0x1e
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 8]
mov word [ebp - 0x2c], bx
mov word [ebp - 0x5a], bx
mov dword [ebp - 0x4e], ebx
call edi
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
call esi
push eax
push dword [ebp + 0x10]
push dword [ebp - 8]
call edi
push dword [ebp + 0x10]
call esi
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
add eax, 0x1e
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
jmp 0x404f87
cmp dword [ebp - 4], ebx
je 0x404fa8
push ebx
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x47c]
push eax
push dword [ebp - 8]
call edi
mov eax, dword [ebp - 4]
add dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 4]
push eax
push 0x400
lea eax, [ebp - 0x47c]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x404f68
mov eax, dword [ebp - 0x10]
push ebx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 4]
push eax
push 0x2e
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x78], 0x2014b50
mov word [ebp - 0x74], 0x14
mov word [ebp - 0x54], bx
mov dword [ebp - 0x52], 0x20
call edi
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
call esi
push eax
push dword [ebp + 0x10]
push dword [ebp - 8]
call edi
push dword [ebp + 0x10]
call esi
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + eax + 0x2e]
sub eax, dword [ebp - 0x18]
push ebx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 4]
push eax
push 0x16
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x28], 0x6054b50
mov word [ebp - 0x24], bx
mov word [ebp - 0x22], bx
mov word [ebp - 0x20], 1
mov word [ebp - 0x1e], 1
mov word [ebp - 0x14], bx
call edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, ebx
jmp 0x405048
push 2
pop ebx
jmp 0x405033
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret