Function at 0x5250e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6ed2db
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x766480]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x64], ebx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
mov dword [ebp - 0x54], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x5253fb
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x58]
push 0
push eax
push 0xe
lea eax, [ebp - 0x20]
push eax
push edi
call esi
test eax, eax
je 0x5253f4
mov eax, 0x4d42
cmp word [ebp - 0x20], ax
je 0x5251a9
push 0x7f4
call fcn.006df8c3
add esp, 4
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x525189
mov ecx, eax
call fcn.00486c20
jmp 0x52518b
xor eax, eax
sub esp, 8
mov dword [esp + 4], 0x43480000
mov dword [esp], 0x43780000
push 0
push 0x8ac9c8
jmp 0x5253e6
push 0
lea eax, [ebp - 0x58]
push eax
push 0x28
lea eax, [ebp - 0x48]
push eax
push edi
call esi
test eax, eax
je 0x5253f4
cmp word [ebp - 0x3a], 0x18
je 0x52520b
push 0x7f4
call fcn.006df8c3
add esp, 4
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x5251eb
mov ecx, eax
call fcn.00486c20
jmp 0x5251ed
xor eax, eax
sub esp, 8
mov dword [esp + 4], 0x43480000
mov dword [esp], 0x43780000
push 0
push 0x8acdc8
jmp 0x5253e6
mov edx, dword [ebp - 0x40]
mov eax, edx
mov ecx, dword [ebp - 0x44]
imul eax, ecx
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], edx
mov dword [ebx + 0x10], eax
cmp ecx, 0x12
jne 0x5253a7
cmp edx, 0xc
jne 0x5253a7
mov esi, ecx
and esi, reloc.WS2_32.dll_closesocket
jns 0x525240
dec esi
or esi, 0xfffffffc
inc esi
lea eax, [ecx + ecx*2]
add esi, eax
imul esi, edx
push esi
call fcn.006dff04
add esp, 4
mov dword [ebp - 0x5c], eax
push 0
push 0
push dword [ebp - 0x16]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x58]
push eax
push esi
mov esi, dword [ebp - 0x5c]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x525286
push esi
call fcn.006dfeff
add esp, 4
jmp 0x5253f4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0xc]
imul eax, dword [ebx + 8]
lea eax, [eax*2 + 1]
push eax
call fcn.006dff04
mov dword [ebx + 0x14], eax
add esp, 4
mov edx, esi
mov dword [ebp - 0x4c], 0
mov byte [eax], 0xff
mov edi, dword [ebx + 0x14]
mov eax, dword [ebx + 0xc]
inc edi
mov dword [ebx + 4], edi
test eax, eax
je 0x525327
dec eax
xor esi, esi
mov dword [ebp - 0x50], eax
mov eax, dword [ebx + 8]
test eax, eax
jle 0x525312
nop
movzx ecx, byte [edx + 2]
mov eax, 0xfff8
and cx, ax
inc esi
movzx eax, byte [edx + 1]
and al, 0xfc
shl cx, 5
movzx eax, al
or cx, ax
movzx eax, byte [edx]
shr al, 3
add edx, 3
movzx eax, al
shl cx, 3
or cx, ax
mov eax, dword [ebp - 0x4c]
mov word [edi + eax*2], cx
inc eax
mov dword [ebp - 0x4c], eax
mov eax, dword [ebx + 8]
cmp esi, eax
jl 0x5252d0
and eax, reloc.WS2_32.dll_closesocket
jns 0x52531e
dec eax
or eax, 0xfffffffc
inc eax
add edx, eax
mov eax, dword [ebp - 0x50]
test eax, eax
jne 0x5252c1
mov eax, dword [ebx + 0xc]
mov ebx, dword [ebx + 8]
add ebx, ebx
mov dword [ebp - 0x60], eax
mov esi, ebx
imul esi, eax
push esi
call fcn.006dff04
push esi
push edi
push eax
mov dword [ebp - 0x50], eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x50]
add esp, 0x10
sub eax, ebx
add eax, esi
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x4c], eax
test esi, esi
jle 0x52537a
nop dword [eax]
push ebx
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x4c]
add esp, 0xc
sub eax, ebx
add edi, ebx
mov dword [ebp - 0x4c], eax
sub esi, 1
jne 0x525360
push dword [ebp - 0x50]
call fcn.006dfeff
mov eax, dword [ebp - 0x5c]
add esp, 4
test eax, eax
je 0x525395
push eax
call fcn.006dfeff
add esp, 4
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x54]
mov eax, dword [eax + 0x14]
mov dword [ecx], eax
mov eax, 1
jmp 0x5253fd
push 0x7f4
call fcn.006df8c3
add esp, 4
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x5253cb
mov ecx, eax
call fcn.00486c20
jmp 0x5253cd
xor eax, eax
sub esp, 8
mov dword [esp + 4], 0x43480000
mov dword [esp], 0x43780000
push 0
push 0x8ad1c8
mov ecx, eax
mov dword [ebp - 4], 0xffffffff
call fcn.004871c0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 8