Function at 0x1000448c
Capabilities:
Check if file exists
Get common file path
Write file on windows

Disassembly:
push 0x840
mov eax, 0x1004161c
call fcn.10021f0e
mov eax, dword [ebp + 8]
mov dword [ebp - 0x840], ecx
mov edi, edx
mov dword [ebp - 0x844], eax
call fcn.100022d0
xor ebx, ebx
mov byte [ebp - 0x829], bl
call fcn.10004ba4
mov esi, eax
mov dword [ebp - 0x834], esi
cmp esi, 0xffffffff
jne 0x100044dc
push str.DownloadFile__:_socket_error
call fcn.10003fa8
xor al, al
jmp 0x100048d4
lea eax, [ebp - 0x83c]
push eax
push 0x1006
push esi
mov dword [ebp - 0x83c], 0xea60
call fcn.10004cc3
lea eax, [ebp - 0x83c]
push eax
push 0x1005
push esi
call fcn.10004cc3
add esp, 0x18
push 2
pop eax
mov word [ebp - 0x820], ax
movzx eax, word [0x1005bb54]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x1005bb34
mov word [ebp - 0x81e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x81c], eax
lea eax, [ebp - 0x820]
push eax
push esi
call fcn.10004c1d
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x10004568
push str.DownloadFile__:_connect_error
call fcn.10003fa8
push esi
call fcn.10004bcf
xor al, al
jmp 0x100048d3
push 0x7ff
lea eax, [ebp - 0x80f]
push ebx
push eax
mov dword [ebp - 0x830], ebx
mov dword [ebp - 0x838], ebx
mov dword [ebp - 0x824], ebx
mov byte [ebp - 0x810], bl
call fcn.10024270
push edi
push str.7EAE9306_5F3C_4344_8E3D_A6EF04E99890
push str._s__s
mov esi, 0x800
lea eax, [ebp - 0x810]
push esi
push eax
call fcn.1001f421
lea eax, [ebp - 0x810]
add esp, 0x20
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100045bb
sub eax, edi
push eax
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x834]
call fcn.10004c4d
add esp, 0xc
cmp eax, 0xffffffff
jne 0x100046b3
push str.DownloadFile__:_send___error
call fcn.10003fa8
pop ecx
push dword [ebp - 0x834]
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x100048d5
cmp edi, ebx
je 0x100046f3
jle 0x100046a1
lea eax, [ebp - 0x810]
push edi
push eax
call fcn.10001aa8
mov eax, dword [ebp - 0x830]
pop ecx
pop ecx
cmp eax, ebx
jne 0x10004682
cmp byte [ebp - 0x810], 0xfe
jne 0x100046a1
push dword [ebp - 0x806]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp - 0x838], eax
cmp eax, ebx
jle 0x100046a1
push eax
call fcn.1001c971
mov dword [ebp - 0x830], eax
lea eax, [edi - 0x342]
pop ecx
test eax, eax
je 0x100046a1
add edi, 0xfffffcbe
push edi
lea eax, [ebp - 0x4ce]
push eax
push dword [ebp - 0x830]
mov dword [ebp - 0x824], edi
call fcn.10021760
add esp, 0xc
jmp 0x100046a1
push edi
lea ecx, [ebp - 0x810]
push ecx
mov ecx, dword [ebp - 0x824]
add ecx, eax
push ecx
call fcn.10021760
add esp, 0xc
add dword [ebp - 0x824], edi
mov eax, dword [ebp - 0x824]
cmp eax, ebx
jle 0x100046b3
cmp eax, dword [ebp - 0x838]
jge 0x100046ff
push esi
lea eax, [ebp - 0x810]
push ebx
push eax
call fcn.10024270
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x834]
xor edi, edi
call fcn.10004c81
mov edi, eax
add esp, 0x14
cmp edi, 0xffffffff
jne 0x10004601
push str.DownloadFile__:_recv___error
call fcn.10003fa8
pop ecx
jmp 0x100048b8
push str.DownloadFile__:_recv_timeout.
call fcn.10003e3a
jmp 0x100046ed
mov edi, 0x100581b4
push edi
lea ecx, [ebp - 0x828]
call fcn.100023ad
push edi
lea ecx, [ebp - 0x824]
mov dword [ebp - 4], ebx
call fcn.100023ad
mov esi, dword [ebp - 0x844]
mov byte [ebp - 4], 1
mov eax, dword [esi]
mov edi, 0x400
cmp dword [eax - 0xc], ebx
jne 0x100047ae
push edi
push edi
lea ecx, [ebp - 0x828]
call fcn.10002489
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x828]
call fcn.10002316
push 0x5c
push dword [ebp - 0x828]
call fcn.1001ef2c
pop ecx
pop ecx
cmp eax, ebx
jne 0x1000476f
or eax, 0xffffffff
jmp 0x10004777
sub eax, dword [ebp - 0x828]
sar eax, 1
push eax
lea eax, [ebp - 0x84c]
push eax
lea ecx, [ebp - 0x828]
call fcn.10002289
push eax
lea ecx, [ebp - 0x828]
mov byte [ebp - 4], 2
call fcn.100023d5
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x84c]
add ecx, 0xfffffff0
call fcn.10002c37
jmp 0x100047c5
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100047c5
push esi
lea ecx, [ebp - 0x828]
call fcn.100023d5
push edi
lea ecx, [ebp - 0x824]
call fcn.10002489
mov edi, dword [ebp - 0x828]
cmp dword [edi - 4], 1
mov esi, eax
jle 0x100047f3
push dword [edi - 0xc]
lea ecx, [ebp - 0x828]
call fcn.10002425
mov edi, dword [ebp - 0x828]
push esi
push ebx
push 0x1004a7c0
push edi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x828]
call fcn.10002316
push 0xffffffffffffffff
lea ecx, [ebp - 0x824]
call fcn.10002316
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
mov esi, eax
lea eax, [ebp - 0x848]
push eax
push dword [ebp - 0x838]
mov dword [ebp - 0x848], ebx
push dword [ebp - 0x830]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10004866
lea ecx, [ebp - 0x824]
call fcn.100022d0
jmp 0x10004878
mov ecx, dword [ebp - 0x840]
lea eax, [ebp - 0x824]
push eax
call fcn.100023d5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x830]
call fcn.1001d838
mov dword [esp], str.DownloadFile__:_get_file_success.
call fcn.10003e3a
pop ecx
mov ecx, dword [ebp - 0x824]
add ecx, 0xfffffff0
mov byte [ebp - 0x829], 1
call fcn.10002c37
or dword [ebp - 4], 0xffffffff
lea ecx, [edi - 0x10]
call fcn.10002c37
push str.DownloadFile__:_before_close_socket.
call fcn.10003e3a
push dword [ebp - 0x834]
call fcn.10004bcf
mov al, byte [ebp - 0x829]
pop ecx
pop ecx
call fcn.10021f58
ret