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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [0x51e080]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
test eax, eax
je 0x49f5f5
push 0
push 0x80
push 3
push 0
push 0
push accept
push eax
mov dword [ebp - 0x264], 0x60
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x49f5f5
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x25c], edi
cmp edi, 0x231060
ja 0x49f5ee
cmp edi, 0x60
jb 0x49f5ee
push edi
call fcn.004d9a7e
add esp, 4
mov dword [ebp - 0x258], eax
lea ecx, [ebp - 0x278]
push 0
push ecx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x258]
test edi, edi
jne 0x49f309
push ecx
call fcn.004d9a63
add esp, 4
jmp 0x49f5f5
mov ebx, dword [ebp - 0x25c]
add ecx, 0xffffffe0
push 0x9c4
add ebx, ecx
call fcn.004d3886
add esp, 4
mov edi, eax
mov ecx, edi
mov dword [ebp - 0x260], edi
push 8
push ebx
mov dword [edi + 0x9c0], 0x271
call fcn.004b42f0
mov ecx, edi
call fcn.00409ee0
mov dword [ebp - 0x274], eax
mov ecx, edi
mov eax, dword [ebx]
mov dword [ebp - 0x270], eax
call fcn.00409ee0
mov dword [ebp - 0x26c], eax
mov ecx, edi
mov eax, dword [ebx + 4]
mov dword [ebp - 0x268], eax
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x28], eax
call fcn.00409ee0
mov dword [ebp - 0x24], eax
mov ecx, edi
mov eax, dword [ebx + 8]
mov dword [ebp - 0x20], eax
call fcn.00409ee0
mov ecx, dword [ebp - 0x260]
mov edi, eax
call fcn.00409ee0
mov ecx, dword [ebx + 0xc]
xor eax, edi
mov edi, dword [ebp - 0x260]
xor ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, edi
mov eax, dword [ebx + 0x18]
xor eax, dword [ebx + 0x10]
mov dword [ebp - 0x18], eax
call fcn.00409ee0
mov ecx, edi
mov dword [ebp - 0x14], eax
call fcn.00409ee0
mov ecx, dword [ebx + 0x14]
xor ecx, eax
mov dword [ebp - 0x10], ecx
mov ecx, edi
call fcn.00409ee0
push 0x9c4
push edi
mov dword [ebp - 0xc], eax
call fcn.004d38b6
mov ecx, dword [esi + 0x24]
lea eax, [ebp - 0x28]
add esp, 8
push eax
push 0x20
lea eax, [ebp - 0x254]
push eax
call fcn.004b48f0
mov edi, dword [ebp - 0x25c]
lea ebx, [edi - 0x40]
push ebx
call fcn.004d9a7e
mov ecx, dword [esi + 0x24]
add esp, 4
mov dword [ebp - 0x25c], eax
push eax
push ebx
push dword [ebp - 0x258]
lea eax, [ebp - 0x274]
push eax
lea eax, [ebp - 0x254]
push eax
call fcn.004b6640
lea eax, [ebp - 0x48]
mov ecx, dword [esi + 0x20]
push eax
push ebx
push dword [ebp - 0x25c]
call fcn.004b2920
lea edx, [edi - 0x40]
mov edi, 0x1c
add edx, dword [ebp - 0x258]
lea ecx, [ebp - 0x48]
nop dword [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x49f5d0
add ecx, 4
add edx, 4
sub edi, 4
jae 0x49f450
push dword [ebp - 0x258]
call fcn.004d9a63
mov edi, dword [ebp - 0x25c]
add esp, 4
mov ecx, dword [edi + 0x10]
cmp ecx, 0xf06925ac
je 0x49f490
cmp ecx, 0xc36ed903
jne 0x49f5de
mov eax, dword [edi + 0x14]
sub ebx, 0x18
add edi, 0x18
mov dword [ebp - 0x258], eax
cmp eax, ebx
ja 0x49f5de
push eax
cmp ecx, 0xf06925ac
mov ecx, esi
push edi
jne 0x49f4ba
call fcn.0049e9d0
jmp 0x49f4bf
call fcn.0049ecc0
mov dword [ebp - 0x260], eax
mov eax, dword [ebp - 0x258]
sub ebx, eax
add edi, eax
mov ecx, dword [edi]
add edi, 4
mov dword [ebp - 0x258], ecx
cmp ecx, ebx
ja 0x49f5de
lea eax, [esi + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 0xaaaaaaab
mul dword [ebp - 0x258]
mov ebx, edx
shr ebx, 4
test ebx, ebx
je 0x49f59f
mov ecx, esi
call fcn.0049fc80
lea eax, [ebp - 0x258]
mov ecx, esi
push eax
lea eax, [ebp - 0x264]
push eax
push edi
call fcn.0049fde0
mov ecx, dword [ebp - 0x258]
test ecx, ecx
jne 0x49f54f
push ecx
lea eax, [ebp - 0x258]
mov ecx, esi
push eax
push 2
push dword [ebp - 0x264]
push edi
call fcn.0049fee0
mov ecx, dword [ebp - 0x258]
mov dword [ebp - 0x260], eax
mov eax, dword [esi + 0xf0]
test eax, eax
jne 0x49f561
mov dword [esi + 0xec], ecx
jmp 0x49f564
mov dword [eax + 0x1c], ecx
mov eax, dword [esi + 0xf0]
add edi, 0x18
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], 0
mov dword [esi + 0xf0], ecx
mov dword [ecx + 0x24], 1
inc dword [esi + 0xe8]
sub ebx, 1
jne 0x49f504
mov eax, dword [esi + 0xec]
mov dword [esi + 0xf4], eax
add esi, 0x30
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp - 0x25c]
call fcn.004d9a63
mov eax, dword [ebp - 0x260]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4
push dword [ebp - 0x258]
call fcn.004d9a63
add esp, 4
push dword [ebp - 0x25c]
call fcn.004d9a63
add esp, 4
jmp 0x49f5f5
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4