Function at 0x404920
Capabilities:
Check http status code
Create directory
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x439cee
mov eax, dword fs:[0]
push eax
sub esp, 0xd4
mov eax, dword [0x44e06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x2c]
call fcn.004090d0
mov dword [ebp - 4], 0
movzx eax, byte [0x4500e2]
test eax, eax
je 0x404a35
push 0x448e10
lea ecx, [ebp - 0xb0]
call fcn.00409520
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xb0]
push ecx
mov ecx, 0x450134
call fcn.00408c40
push eax
push 0x448e14
lea edx, [ebp - 0xe0]
push edx
call fcn.00411b90
add esp, 0xc
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x60]
push ecx
lea edx, [ebp - 0xc8]
push edx
call fcn.00404830
add esp, 8
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x64]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00408f50
lea ecx, [ebp - 0xc8]
call fcn.00408f00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xe0]
call fcn.004093c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb0]
call fcn.004093c0
jmp 0x404a42
push 0x448e48
lea ecx, [ebp - 0x2c]
call fcn.00408e70
push 0
push 0
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.00408e00
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x404a7a
push 0
push 0x50
push 0x448ef0
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x44], eax
jmp 0x404a98
mov dword [ebp - 0x68], 0xfffffffe
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x68]
jmp 0x404e83
cmp dword [ebp - 0x44], 0
je 0x404abf
push 0
push 0
push 0
push 0
push str._UpdateService_Update.ini
push 0x448f30
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x3c], eax
jmp 0x404aed
cmp dword [ebp - 0x40], 0
je 0x404acf
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x6c], 0xfffffffe
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x6c]
jmp 0x404e83
cmp dword [ebp - 0x3c], 0
je 0x404b0e
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x50], eax
jmp 0x404b4c
cmp dword [ebp - 0x44], 0
je 0x404b1e
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x40], 0
je 0x404b2e
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x70], 0xfffffffe
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x70]
jmp 0x404e83
cmp dword [ebp - 0x50], 0
je 0x404b63
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x54], eax
jmp 0x404bb1
cmp dword [ebp - 0x3c], 0
je 0x404b73
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x44], 0
je 0x404b83
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x40], 0
je 0x404b93
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x74], 0xfffffffe
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x74]
jmp 0x404e83
cmp dword [ebp - 0x54], 0
je 0x404de3
mov dword [ebp - 0x38], 4
push 0
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0x20000013
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp dword [ebp - 0x14], 0xc8
jne 0x404d8d
push 0
mov ecx, 0x4501a4
call fcn.00408e00
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
jne 0x404c24
mov dword [ebp - 0x7c], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x7c]
jmp 0x404e83
push 0
push 2
push 2
push 0
push 1
push 0xc0000000
mov ecx, 0x4501d4
call fcn.00408e00
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0xffffffff
jne 0x404c70
mov dword [ebp - 0x80], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x80]
jmp 0x404e83
mov dword [ebp - 0x38], 0
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x404c9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x448f38
call fcn.00401320
add esp, 8
mov ecx, dword [ebp - 0x38]
add ecx, 1
push ecx
call fcn.0041ae1e
add esp, 4
mov dword [ebp - 0x84], eax
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x48], edx
cmp dword [ebp - 0x48], 0
jne 0x404cda
push 0x448f60
call fcn.00401320
add esp, 4
mov dword [ebp - 0x38], 0
jmp 0x404d77
mov eax, dword [ebp - 0x38]
add eax, 1
push eax
push 0
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.0041cb70
add esp, 0xc
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x404d1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x448f70
call fcn.00401320
add esp, 8
jmp 0x404d43
push 0
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x98], eax
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x58]
push edx
call fcn.0041aa0f
add esp, 4
cmp dword [ebp - 0x58], 0
jne 0x404d67
mov dword [ebp - 0x88], 0
jmp 0x404d77
mov dword [ebp - 0x48], 0x8123
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x38], 0
ja 0x404c70
mov ecx, dword [ebp - 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404de1
cmp dword [ebp - 0x3c], 0
je 0x404d9d
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x44], 0
je 0x404dad
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x40], 0
je 0x404dbd
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x8c], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x8c]
jmp 0x404e83
jmp 0x404e34
cmp dword [ebp - 0x3c], 0
je 0x404df3
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x44], 0
je 0x404e03
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x40], 0
je 0x404e13
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x90], 0xfffffffe
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x90]
jmp 0x404e83
cmp dword [ebp - 0x3c], 0
je 0x404e44
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x44], 0
je 0x404e54
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x40], 0
je 0x404e64
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x94], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408f00
mov eax, dword [ebp - 0x94]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a9fe
mov esp, ebp
pop ebp
ret