Function at 0x509f20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565be8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x120
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
push str.Urlmon.dll
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [ebp - 0x28], edi
je 0x50a136
push str.FindMimeFromData
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x24], ebx
je 0x50a12b
mov eax, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 3
push connect
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
mov dword [ebp - 0x20], edx
je 0x50a11e
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x12c]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
xor edi, edi
lea ecx, [ebp - 0x18]
push edi
push ecx
lea eax, [ebp - 0x12c]
push pe_nt_image_headers32
push eax
push edx
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
je 0x50a0e3
mov eax, dword [ebp - 0x18]
cmp eax, edi
jbe 0x50a0e3
lea ecx, [ebp - 0x1c]
push edi
push ecx
push edi
push edi
lea edx, [ebp - 0x12c]
push eax
push edx
push edi
push edi
mov dword [ebp - 0x1c], edi
call ebx
cmp eax, edi
jne 0x50a0ef
mov eax, dword [ebp - 0x1c]
cmp eax, edi
je 0x50a0e3
lea ebx, [esi + 0x1c0]
push eax
mov ecx, ebx
call fcn.0054236e
mov eax, dword [ebx]
push str.text_html
push eax
call fcn.0052f680
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x1c]
add esp, 8
neg eax
sbb eax, eax
push edx
inc eax
mov dword [ecx], eax
mov byte [esi + 0x339], 1
mov dword [esi + 0x1a4], 3
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebx]
push str.application_octet_stream
push eax
mov dword [ebp - 4], 1
call fcn.0052f680
add esp, 8
test eax, eax
jne 0x50a0e3
cmp dword [ebp - 0x18], 7
jb 0x50a0e3
mov ecx, 3
mov edi, 0x5a98ac
lea esi, [ebp - 0x12c]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x50a0e0
mov cl, byte [ebp - 0x128]
mov al, 1
test cl, 0x80
je 0x50a09e
xor al, al
test cl, 0x40
je 0x50a0a5
xor al, al
test cl, 0x20
je 0x50a0ac
xor al, al
test cl, 0x10
je 0x50a0b3
xor al, al
test cl, 2
je 0x50a0ba
xor al, al
mov cl, byte [ebp - 0x129]
test cl, cl
je 0x50a0e0
cmp cl, 2
ja 0x50a0e0
test al, al
je 0x50a0e0
push str.video_x_flv
push 0x5a3e24
push ebx
call fcn.0053afda
add esp, 0xc
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x50a11e
cmp dword [ebp - 0x18], 0x100
jne 0x50a0e3
mov ecx, dword [ebp - 0x20]
mov byte [esi + 0x339], 1
push ecx
mov dword [esi + 0x1a4], 3
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x50a11e
mov edi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 4], 0
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x50a170
lea ecx, [ebp - 0x14]
call fcn.0050bd50
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push edx
mov byte [ebp - 4], 5
call fcn.0050beb0
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], 0
mov dword [ecx], eax
lea ecx, [ebp - 0x14]
mov byte [esi + 0x339], 1
mov dword [esi + 0x1a4], 3
call fcn.0050bd80
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8