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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5184d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 0x220], eax
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x224], ebx
push esi
push edi
mov dword [ebp - 0x218], eax
or edi, 0xffffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x228], eax
mov byte [ebp - 0x20d], bl
test ecx, ecx
jne 0x4947e9
mov ebx, edx
jmp 0x494811
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.0049472e
mov esi, eax
test esi, esi
je 0x49480b
push esi
push 0x23ff013b
jmp 0x4949ba
lea ebx, [ebp - 0x20c]
mov ecx, ebx
call fcn.004946a3
mov edi, eax
cmp edi, 0xffffffff
jne 0x494831
call fcn.004c73cc
mov esi, eax
push esi
push 0x2408013b
jmp 0x4949ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x494845
mov byte [ebp - 0x20d], 1
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x494867
call fcn.004c73cc
mov esi, eax
push esi
push 0x2413013b
jmp 0x4949ba
cmp esi, dword [ebp + 0xc]
jne 0x494937
xor eax, eax
push esi
push eax
mov byte [ebp - 0x20e], al
mov dword [ebp - 0x21c], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x214], eax
test eax, eax
jne 0x4948a6
mov esi, 0x8007000e
push esi
push 0x2420013b
call dword [sym.imp.certcli.dll_Ordinal_357]
jmp 0x4949f5
push 0
lea ecx, [ebp - 0x21c]
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4948e7
cmp esi, dword [ebp - 0x21c]
jne 0x4948e7
push esi
mov esi, dword [ebp - 0x214]
push esi
push dword [ebp - 0x220]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x494902
mov byte [ebp - 0x20e], 1
jmp 0x494902
call fcn.004c73cc
test eax, eax
je 0x4948fc
push eax
push 0x2433013b
call dword [sym.imp.certcli.dll_Ordinal_357]
mov esi, dword [ebp - 0x214]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp byte [ebp - 0x20e], 0
jne 0x494a57
cmp dword [0x518ddc], 0
jne 0x494956
mov eax, 0x800700b7
push eax
push 0x243f013b
mov esi, eax
call dword [sym.imp.certcli.dll_Ordinal_357]
jmp 0x4949ca
cmp byte [ebp - 0x20d], 0
je 0x494956
cmp dword [0x518ddc], 0
jne 0x494956
mov eax, 0x800700b7
push eax
push 0x2445013b
jmp 0x49492a
xor eax, eax
push eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x494976
call fcn.004c73cc
mov esi, eax
push esi
push 0x244f013b
jmp 0x4949ba
push 0
lea eax, [ebp - 0x224]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x220]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4949a2
call fcn.004c73cc
mov esi, eax
push esi
push 0x245a013b
jmp 0x4949ba
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x494a07
call fcn.004c73cc
mov esi, eax
push esi
push 0x2460013b
call dword [sym.imp.certcli.dll_Ordinal_357]
mov eax, esi
cmp esi, 0x800700b7
jne 0x4949ef
push 0x405e80
push ebx
mov ecx, 0xb07
call fcn.004cf8b9
push eax
call fcn.004c5942
push 0x406520
call fcn.004c5942
add esp, 0x10
jmp 0x494a00
mov esi, eax
test eax, eax
je 0x494a00
push ebx
push esi
xor edx, edx
xor ecx, ecx
call fcn.004cfab1
cmp edi, 0xffffffff
je 0x494a60
jmp 0x494a59
cmp dword [0x51996c], 0
je 0x494a3c
xor ecx, ecx
cmp byte [ebp - 0x20d], cl
push ebx
sete cl
dec ecx
and ecx, 0x189
add ecx, 0x97d
call fcn.004cf8b9
push eax
push 0x4056b0
call fcn.004c5942
add esp, 0xc
cmp byte [ebp - 0x20d], 0
mov eax, dword [ebp - 0x228]
jne 0x494a51
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x494a57
inc dword [eax]
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005036b0
leave
ret 0x10