Function at 0x4726b0
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 - 0x264], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x472a81
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x258], edi
cmp edi, dword [esi + 0x24]
ja 0x472a7a
cmp edi, 0x50
jb 0x472a7a
push edi
call fcn.004d9a7e
mov esi, eax
push edi
mov dword [ebp - 0x25c], esi
call fcn.004d9a7e
add esp, 8
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x278]
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 0x472a5f
push 0x9c4
call fcn.004d3886
mov ebx, eax
add esp, 4
mov eax, dword [ebp - 0x25c]
mov ecx, ebx
add eax, 0xffffffe0
mov dword [ebp - 0x27c], 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 - 0x274], eax
mov eax, dword [edi]
xor eax, 0x2781ce40
mov dword [ebp - 0x270], eax
call fcn.00409ee0
imul eax, eax, 0xf4908bb2
mov ecx, ebx
mov dword [ebp - 0x26c], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x268], 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 ebx, dword [ebp - 0x264]
lea eax, [ebp - 0x28]
add esp, 8
mov ecx, dword [ebx + 4]
push eax
push 0x20
lea eax, [ebp - 0x254]
mov ecx, dword [ecx + 0x484]
push eax
call fcn.004b48f0
mov edi, dword [ebp - 0x258]
mov esi, dword [ebp - 0x260]
push esi
lea eax, [edi - 0x20]
push eax
push dword [ebp - 0x25c]
lea eax, [ebp - 0x274]
push eax
lea eax, [ebp - 0x254]
push eax
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + 0x484]
call fcn.004b6640
mov ecx, dword [ebx + 4]
lea eax, [ebp - 0x48]
push eax
lea eax, [edi - 0x40]
push eax
mov ecx, dword [ecx + 0x480]
push esi
call fcn.004b2920
lea edx, [esi - 0x40]
mov esi, 0x1c
add edx, edi
lea ecx, [ebp - 0x48]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x472a5f
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4728b3
mov ebx, dword [ebp - 0x260]
lea eax, [edi - 0x50]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x258], ecx
cmp ecx, eax
ja 0x472a5f
mov esi, dword [ebp - 0x264]
add ebx, 8
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x258]
cmp ecx, 8
jb 0x47294a
mov eax, dword [ebx]
sub ecx, 8
mov edi, dword [ebx + 4]
add ebx, 8
mov dword [ebp - 0x258], eax
cmp edi, ecx
ja 0x47294a
xor edx, edx
div dword [esi + 0x20]
mov esi, dword [esi + 0x2c]
mov esi, dword [esi + edx*4]
test esi, esi
je 0x47293b
mov eax, dword [ebp - 0x258]
nop word [eax + eax]
cmp dword [esi], eax
je 0x472982
mov esi, dword [esi + 4]
test esi, esi
jne 0x472930
sub ecx, edi
mov esi, dword [ebp - 0x264]
add ebx, edi
cmp ecx, 8
jae 0x472900
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp - 0x25c]
call fcn.004d9a63
push dword [ebp - 0x260]
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
mov edx, dword [esi + 8]
sub ecx, edi
movzx eax, dl
mov dword [ebp - 0x258], ecx
test dl, dl
jne 0x4729a7
cmp edi, 4
jne 0x47293d
mov dword [esi + 8], accept
mov eax, dword [ebx]
mov dword [esi + 0x14], eax
jmp 0x47293d
cmp eax, 1
jne 0x4729c2
cmp edi, 4
jne 0x47293d
mov dword [esi + 8], reloc.WS2_32.dll_accept
mov eax, dword [ebx]
mov dword [esi + 0x14], eax
jmp 0x47293d
cmp eax, 2
jne 0x4729e1
cmp edi, 4
jne 0x47293d
mov dword [esi + 8], reloc.WS2_32.dll_bind
mov eax, dword [ebx]
mov dword [esi + 0x14], eax
jmp 0x47293d
cmp eax, 3
jne 0x472a1e
test edx, edx
jns 0x4729f5
push dword [esi + 0x14]
call fcn.004d9a63
add esp, 4
push edi
mov dword [esi + 8], reloc.WS2_32.dll_closesocket
mov dword [esi + 0xc], edi
call fcn.004d9a7e
push edi
push ebx
push eax
mov dword [esi + 0x14], eax
call fcn.004d6950
mov ecx, dword [ebp - 0x258]
add esp, 0x10
jmp 0x47293d
cmp eax, 4
jne 0x47293d
test edx, edx
jns 0x472a36
push dword [esi + 0x14]
call fcn.004d9a63
add esp, 4
push edi
mov dword [esi + 8], reloc.WS2_32.dll_connect
mov dword [esi + 0xc], edi
call fcn.004d9a7e
push edi
push ebx
push eax
mov dword [esi + 0x14], eax
call fcn.004d6950
mov ecx, dword [ebp - 0x258]
add esp, 0x10
jmp 0x47293d
push dword [ebp - 0x25c]
call fcn.004d9a63
push dword [ebp - 0x260]
call fcn.004d9a63
add esp, 8
jmp 0x472a81
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