Function at 0x4184e0
Capabilities:
Get file size
Read file on windows
Set file attributes

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x44b078
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push ebp
push esi
mov ebx, ecx
mov ecx, dword [esp + 0x48]
push edi
mov edi, dword [ecx + 0x18]
cmp edi, 0x10
lea edx, [ecx + 4]
jb 0x418511
mov esi, dword [edx]
jmp 0x418513
mov esi, edx
mov eax, dword [ecx + 0x14]
add eax, esi
cmp edi, 0x10
jb 0x41851f
mov edx, dword [edx]
push eax
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.00403270
mov ecx, dword [esp + 0x44]
cmp dword [ecx + 0x18], 0x10
jb 0x41853a
mov eax, dword [ecx + 4]
jmp 0x41853d
lea eax, [ecx + 4]
mov ecx, dword [ecx + 0x14]
inc eax
mov dword [esp + 0x44], eax
mov eax, dword [ebx + 0x1dc]
lea esi, [ecx + eax + 1]
push esi
call fcn.0043bc93
mov ebp, eax
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx + 0x1e0]
add esp, 4
cmp eax, 0x10
jb 0x418581
mov ecx, dword [ebx + 0x1cc]
jmp 0x418587
lea ecx, [ebx + 0x1cc]
mov edx, ebp
lea esp, [esp]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x418590
mov eax, dword [esp + 0x44]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4185a0
mov edi, ebp
sub eax, edx
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4185b0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x80
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 0
push 3
push 0
push 0
push closesocket
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x44], eax
jne 0x41862c
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4185f8
mov ecx, dword [esp + 0x48]
sub eax, edx
push eax
push ebp
call fcn.00401ab0
push ebp
call fcn.0043c389
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret 0xc
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, dword [esp + 0x48]
mov edi, eax
mov eax, dword [esi + 0x14]
cmp edi, eax
mov dword [esp + 0x10], 0
ja 0x418656
push 0xffffffffffffffff
push edi
mov ecx, esi
call fcn.004015d0
jmp 0x418664
mov ecx, edi
sub ecx, eax
push 0x20
push ecx
mov ecx, esi
call fcn.00415de0
cmp dword [esi + 0x18], 0x10
lea ebx, [esi + 4]
jb 0x418671
mov eax, dword [ebx]
jmp 0x418673
mov eax, ebx
push 0
lea edx, [esp + 0x14]
push edx
push edi
mov edi, dword [esp + 0x50]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4186b7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xb
push str.file_error.
mov ecx, esi
call fcn.00401ab0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret 0xc
mov eax, dword [esi + 0x14]
dec eax
xor edi, edi
cmp eax, edi
jle 0x418727
mov edx, dword [esi + 0x18]
cmp edx, 0x10
jb 0x4186cd
mov ecx, dword [ebx]
jmp 0x4186cf
mov ecx, ebx
cmp byte [ecx + eax], 0x20
jg 0x4186dc
dec eax
cmp eax, edi
jg 0x4186c4
jmp 0x418727
inc eax
push eax
push edi
lea eax, [esp + 0x20]
push eax
mov ecx, esi
call fcn.0040bc30
push 0xffffffffffffffff
push edi
push eax
mov ecx, esi
mov dword [esp + 0x48], edi
call fcn.004019c0
cmp dword [esp + 0x30], 0x10
mov dword [esp + 0x3c], 0xffffffff
jb 0x418716
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0043c389
add esp, 4
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], edi
mov byte [esp + 0x1c], 0
mov esi, dword [esp + 0x4c]
push 1
push 0x44f4dc
mov ecx, esi
call fcn.00401ab0
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418740
sub eax, edx
push eax
push ebp
mov ecx, esi
call fcn.0040bab0
push ebp
call fcn.0043c389
mov edx, dword [esp + 0x48]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x30
ret 0xc