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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff40
xor ecx, ecx
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404a14
mov eax, dword [ebp - 8]
inc ebp
clc
call fcn.00404a14
xor eax, eax
push ebp
push 0x461f45
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x4671a8]
mov edx, 0x461f5c
call fcn.004045b8
mov byte [ebp - 9], 0
mov eax, dword [ebp - 4]
call fcn.00404824
test eax, eax
je 0x461f0c
mov eax, dword [ebp - 8]
call fcn.00404824
test eax, eax
je 0x461f0c
push 0
lea eax, [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.00404a24
push eax
call sub.kernel32.dll_OpenFile
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x461cbb
push 0x46201c
push dword [ebp - 4]
push 0x46202c
lea edx, [ebp - 0xb4]
xor eax, eax
call fcn.00408a9c
push dword [ebp - 0xb4]
lea eax, [ebp - 0xb0]
mov edx, 4
call fcn.004048e4
mov eax, dword [ebp - 0xb0]
call fcn.0045a4c4
jmp 0x461f0c
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetFileSize_1
add eax, 5
mov dword [ebp - 0x14], eax
mov eax, dword [0x4671a8]
mov edx, 0x462038
call fcn.004045b8
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
mov ecx, 1
mov edx, dword [0x461bb8]
call fcn.00405564
add esp, 4
mov edx, 0x466f60
mov eax, dword [ebp - 0x1c]
mov ecx, 5
call fcn.00406f4c
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
sub eax, 5
push eax
mov eax, dword [ebp - 0x1c]
add eax, 5
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
jne 0x461d68
push 0x462070
push dword [ebp - 4]
push 0x46202c
lea edx, [ebp - 0xbc]
xor eax, eax
call fcn.00408a9c
push dword [ebp - 0xbc]
lea eax, [ebp - 0xb8]
mov edx, 4
call fcn.004048e4
mov eax, dword [ebp - 0xb8]
call fcn.0045a4c4
jmp 0x461f0c
mov eax, dword [0x4671a8]
mov edx, 0x462084
call fcn.004045b8
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x14], 0xa
jbe 0x461e0f
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 5]
cmp al, byte [0x466f60]
jne 0x461e0f
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 6]
cmp al, byte [0x466f61]
jne 0x461e0f
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 7]
cmp al, byte [0x466f62]
jne 0x461e0f
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 8]
cmp al, byte [0x466f63]
jne 0x461e0f
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 9]
cmp al, byte [0x466f64]
jne 0x461e0f
push 0x4620e0
push dword [ebp - 4]
push 0x4620f0
push dword [ebp - 8]
lea eax, [ebp - 0xc0]
mov edx, 4
call fcn.004048e4
mov eax, dword [ebp - 0xc0]
call fcn.0045a4c4
mov eax, dword [0x4671a8]
mov edx, 0x462108
call fcn.004045b8
jmp 0x461f0c
mov eax, dword [0x4671a8]
mov edx, 0x4621e0
call fcn.004045b8
mov eax, dword [ebp - 0x14]
dec eax
sub eax, 5
jb 0x461e77
inc eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 5
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
xor byte [eax + edx], 0xc2
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
movzx eax, byte [eax + edx]
add ax, 0x79
mov word [ebp - 0x1e], ax
cmp word [ebp - 0x1e], 0xff
jle 0x461e63
mov ax, word [ebp - 0x1e]
sub ax, 0xff
dec eax
mov word [ebp - 0x1e], ax
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov cl, byte [ebp - 0x1e]
mov byte [eax + edx], cl
inc dword [ebp - 0x18]
dec dword [ebp - 0x24]
jne 0x461e32
mov eax, dword [ebp - 8]
call fcn.00404824
test eax, eax
jne 0x461e8e
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004045fc
mov eax, dword [0x4671a8]
mov edx, 0x46222c
call fcn.004045b8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 8]
call fcn.00404a24
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x461f0c
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x461ee5
mov byte [ebp - 9], 1
mov eax, dword [0x4671a8]
mov edx, 0x4622c8
call fcn.004045b8
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [0x4671a8]
mov edx, 0x462378
call fcn.004045b8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x461f4c
lea eax, [ebp - 0xc0]
mov edx, 5
call fcn.00404588
lea eax, [ebp - 0x1c]
mov edx, dword [0x461bb8]
call fcn.00405570
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404588
ret