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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [0x51e080]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 0
push accept
mov esi, ecx
push eax
mov dword [ebp - 0x25c], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x471323
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x258], edi
cmp edi, dword [esi + 0x28]
ja 0x47131c
cmp edi, 0x50
jb 0x47131c
push edi
call fcn.004d9a7e
mov esi, eax
push edi
mov dword [ebp - 0x264], esi
call fcn.004d9a7e
add esp, 8
mov dword [ebp - 0x268], eax
lea eax, [ebp - 0x27c]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x471301
push 0x9c4
call fcn.004d3886
mov ebx, eax
add esp, 4
mov eax, dword [ebp - 0x264]
mov ecx, ebx
add eax, 0xffffffe0
mov dword [ebp - 0x260], ebx
add edi, eax
push 8
push edi
mov dword [ebx + 0x9c0], 0x271
call fcn.004b42f0
mov ecx, ebx
call fcn.00409ee0
xor eax, 0x729a48f7
mov ecx, ebx
mov dword [ebp - 0x278], eax
mov eax, dword [edi]
xor eax, 0x2781ce40
mov dword [ebp - 0x274], eax
call fcn.00409ee0
imul eax, eax, 0xf4908bb2
mov ecx, ebx
mov dword [ebp - 0x270], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x26c], eax
mov eax, dword [edi + 0x1c]
xor eax, 0x2781ce40
mov dword [ebp - 0x28], eax
call fcn.00409ee0
mov dword [ebp - 0x24], eax
mov ecx, ebx
mov eax, dword [edi + 8]
mov dword [ebp - 0x20], eax
call fcn.00409ee0
mov ecx, ebx
mov esi, eax
call fcn.00409ee0
mov ecx, dword [edi + 0xc]
xor eax, esi
xor ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, ebx
mov eax, dword [edi + 0x18]
xor eax, dword [edi + 0x10]
mov dword [ebp - 0x18], eax
call fcn.00409ee0
mov ecx, ebx
mov dword [ebp - 0x14], eax
call fcn.00409ee0
mov ecx, dword [edi + 0x14]
xor ecx, eax
mov dword [ebp - 0x10], ecx
mov ecx, ebx
call fcn.00409ee0
xor eax, 0x19750309
push 0x9c4
push ebx
mov dword [ebp - 0xc], eax
call fcn.004d38b6
mov edi, dword [ebp - 0x25c]
lea eax, [ebp - 0x28]
add esp, 8
mov ecx, dword [edi + 0x38]
push eax
push 0x20
lea eax, [ebp - 0x254]
mov ecx, dword [ecx + 0x484]
push eax
call fcn.004b48f0
mov ebx, dword [ebp - 0x258]
mov esi, dword [ebp - 0x268]
push esi
lea eax, [ebx - 0x20]
push eax
push dword [ebp - 0x264]
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x254]
push eax
mov ecx, dword [edi + 0x38]
mov ecx, dword [ecx + 0x484]
call fcn.004b6640
mov ecx, dword [edi + 0x38]
lea eax, [ebp - 0x48]
push eax
lea eax, [ebx - 0x40]
push eax
mov ecx, dword [ecx + 0x480]
push esi
call fcn.004b2920
lea edx, [esi - 0x40]
mov esi, 0x1c
add edx, ebx
lea ecx, [ebp - 0x48]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x471301
add ecx, 4
add edx, 4
sub esi, 4
jae 0x471163
mov esi, dword [ebp - 0x268]
mov eax, dword [ebp - 0x258]
add eax, 0xffffffb0
mov ebx, dword [esi + 4]
cmp ebx, eax
ja 0x471301
lea eax, [edi + 4]
add esi, 8
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp ebx, 8
jb 0x4711fc
mov edi, dword [esi + 4]
lea edx, [esi + 8]
mov eax, dword [esi]
sub ebx, 8
mov dword [ebp - 0x260], eax
mov dword [ebp - 0x258], edx
cmp edi, ebx
ja 0x4711f6
mov eax, dword [ebp - 0x25c]
mov ecx, dword [eax + 0x20]
and ecx, dword [ebp - 0x260]
mov eax, dword [eax + 0x30]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x4711ec
mov eax, dword [ebp - 0x260]
nop
cmp eax, dword [esi + 8]
je 0x47123d
mov esi, dword [esi + 4]
test esi, esi
jne 0x4711e0
sub ebx, edi
lea esi, [edi + edx]
cmp ebx, 8
jae 0x4711a4
mov edi, dword [ebp - 0x25c]
push 1
mov ecx, edi
call fcn.004715b0
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp - 0x264]
call fcn.004d9a63
push dword [ebp - 0x268]
call fcn.004d9a63
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4
movzx eax, byte [esi + 0x10]
sub ebx, edi
push esi
mov dword [ebp - 0x260], eax
call fcn.004718c0
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x4712f6
cmp eax, 1
jne 0x47128a
cmp edi, 4
jne 0x4712f6
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 0x25c]
push dword [eax]
push esi
call fcn.0046fec0
mov edx, dword [ebp - 0x258]
jmp 0x4711ee
cmp eax, 2
jne 0x4712b5
cmp edi, 4
jne 0x4712f6
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 0x25c]
push esi
movss xmm2, dword [eax]
call fcn.004700e0
mov edx, dword [ebp - 0x258]
jmp 0x4711ee
cmp eax, 3
jne 0x4712d9
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 0x25c]
push edi
push eax
push esi
call fcn.00470520
mov edx, dword [ebp - 0x258]
jmp 0x4711ee
cmp eax, 4
je 0x4712f6
cmp eax, 5
jne 0x4712f6
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 0x25c]
push eax
push esi
call fcn.00470350
mov edx, dword [ebp - 0x258]
jmp 0x4711ee
push dword [ebp - 0x264]
call fcn.004d9a63
push dword [ebp - 0x268]
call fcn.004d9a63
add esp, 8
jmp 0x471323
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