Function at 0x41c804
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4c
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], 0xf
ja 0x41c81b
add eax, 4
jmp 0x41c81e
mov eax, dword [eax + 4]
mov esi, dword [ebp + 8]
sub esp, 4
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push eax
call sub.KERNEL32.DLL_CreateFileA
add esp, 4
mov ebx, eax
mov dword [ebp - 0x3c], 0x53474c
mov dword [ebp - 0x38], 0x53c1a4
mov dword [ebp - 0x34], ebp
mov dword [ebp - 0x2c], esp
mov dword [ebp - 0x34], 0x41ca13
lea edi, [ebp - 0x58]
mov eax, edi
call fcn.005353b5
cmp ebx, 0xffffffff
je 0x41c8a2
mov dword [ebp - 0x50], 0xffffffff
sub esp, 8
push 0
push ebx
call sub.KERNEL32.DLL_GetFileSize
add esp, 8
test eax, eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], eax
je 0x41c8bc
cmp eax, 0xffffffff
jne 0x41c8c2
mov dword [ebp - 0x50], 0xffffffff
sub esp, 0xc
push ebx
call sub.KERNEL32.DLL_CloseHandle
add esp, 0xc
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
jmp 0x41c9f1
xor edi, edi
xor esi, esi
jmp 0x41c924
cmp eax, 0x1000
jb 0x41c8f5
cmp eax, 0xffffffdd
jae 0x41ca07
lea eax, [eax + 0x23]
mov dword [ebp - 0x50], 2
sub esp, 0xc
push eax
call fcn.0051c414
add esp, 0x10
mov esi, eax
add esi, 0x23
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x41c90a
mov dword [ebp - 0x50], 3
sub esp, 0xc
push eax
call fcn.0051c414
add esp, 0x10
mov esi, eax
sub esp, 4
mov ebx, dword [ebp - 0x1c]
push ebx
push 0
push esi
lea edi, [esi + ebx]
call fcn.00524727
mov eax, ebx
add esp, 0x10
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x50], 4
sub esp, 0xc
lea ecx, [ebp - 0x20]
push 0
push ecx
push eax
push edx
push ebx
call sub.KERNEL32.DLL_ReadFile
add esp, 0xc
test eax, eax
je 0x41c998
mov dword [ebp - 0x50], 6
sub esp, 0xc
push dword [ebp - 0x18]
call sub.KERNEL32.DLL_CloseHandle
add esp, 0xc
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x20], eax
mov esi, dword [ebp + 8]
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
jne 0x41c9c5
mov eax, dword [ebp - 0x10]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 0xc], eax
lea edi, [ebp - 0x58]
jmp 0x41c9f1
mov dword [ebp - 0x50], 5
sub esp, 0xc
push dword [ebp - 0x18]
call sub.KERNEL32.DLL_CloseHandle
add esp, 0xc
mov esi, dword [ebp + 8]
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
cmp dword [ebp - 0x10], 0
lea edi, [ebp - 0x58]
je 0x41c9f1
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
sub ecx, dword [ebp - 0x10]
cmp ecx, 0x1000
jb 0x41c9e5
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 4]
sub esp, 0xc
push eax
call fcn.0051a4c8
add esp, 0x10
sub esp, 0xc
push edi
call fcn.005353d6
add esp, 0x10
mov eax, esi
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x50], 1
call fcn.0051fe5c
mov eax, dword [ebp - 0x54]
cmp eax, 6
jbe 0x41ca1f
ud2
sub eax, 1
jmp dword [eax*4 + 0x41ca78]
mov esi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
jmp 0x41ca62
mov esi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x10], 0
je 0x41ca62
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
sub ecx, dword [ebp - 0x10]
cmp ecx, 0x1000
jb 0x41ca56
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 4]
sub esp, 0xc
push eax
call fcn.0051a4c8
add esp, 0x10
mov dword [ebp - 0x50], 0xffffffff
sub esp, 0xc
push esi
call fcn.00535354
add esp, 0xc
nop dword [eax]
sub ecx, edx
inc ecx
add byte [ebx], ch
retf 0x41