Function at 0x4122f0
Capabilities:
Delete file
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 0x4e4e7d
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x52910c]
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 dword [ebp - 0xfc], ecx
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
push 0
push ebx
mov dword [ebp - 0x128], ebx
call fcn.004c8869
add esp, 8
cmp eax, 0xffffffff
je 0x4124c8
test esi, esi
je 0x4124c8
push ebx
lea ecx, [ebp - 0xa0]
call fcn.00403f20
push ecx
lea edx, [ebp - 0xa0]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xe8]
call fcn.0041fba0
mov edx, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xd0]
call fcn.0040f3f0
mov edx, eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x70]
call fcn.0041fd00
add esp, 4
mov eax, dword [ebp - 0xbc]
cmp eax, 0x10
jb 0x4123b4
inc eax
lea ecx, [ebp - 0xd0]
push eax
push dword [ebp - 0xd0]
call fcn.004099a0
mov dword [ebp - 0xbc], 0xf
mov dword [ebp - 0xc0], 0
mov byte [ebp - 0xd0], 0
mov eax, dword [ebp - 0xd4]
cmp eax, 0x10
jb 0x4123ed
inc eax
lea ecx, [ebp - 0xe8]
push eax
push dword [ebp - 0xe8]
call fcn.004099a0
mov dword [ebp - 0xd4], 0xf
mov dword [ebp - 0xd8], 0
mov byte [ebp - 0xe8], 0
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x8c]
cmp eax, 8
jb 0x41242a
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.00403f90
xor eax, eax
mov dword [ebp - 0x8c], 7
push esi
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x90], 0
mov word [ebp - 0xa0], ax
call fcn.00403f20
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
push dword [ebp - 0x60]
cmovae eax, dword [ebp - 0x70]
lea ecx, [ebp - 0x88]
cmp dword [ebp - 0x74], 8
mov edx, dword [ebp - 0x78]
cmovae ecx, dword [ebp - 0x88]
push eax
call fcn.00403400
add esp, 8
test eax, eax
jne 0x4124ae
mov ecx, dword [ebp - 0xfc]
push dword [ecx + 0x10]
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [ebp - 0x88]
call fcn.00404060
lea ecx, [ebp - 0x70]
call fcn.00404060
mov eax, 1
jmp 0x412b13
lea ecx, [ebp - 0x88]
call fcn.00404060
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0xffffffff
call fcn.00404060
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4124d0
sub ecx, edx
sar ecx, 1
jne 0x4124e8
xor eax, eax
jmp 0x412b13
xor eax, eax
mov dword [ebp - 0xa4], 7
mov dword [ebp - 0xa8], 0
mov word [ebp - 0xb8], ax
mov ecx, dword [ebp - 0xfc]
lea eax, [ebp - 0xb8]
push eax
push edi
mov dword [ebp - 4], 7
call fcn.00411a30
xor eax, eax
mov dword [ebp - 0x44], 7
xorps xmm0, xmm0
mov dword [ebp - 0x104], eax
push eax
xor esi, esi
movlpd qword [ebp - 0x118], xmm0
push 0x5046d8
lea ecx, [ebp - 0x58]
mov dword [ebp - 0xf8], esi
movlpd qword [ebp - 0x120], xmm0
mov dword [ebp - 0x48], eax
mov word [ebp - 0x58], ax
call fcn.00403e20
xor eax, eax
mov byte [ebp - 4], 8
push eax
push 0x5046d8
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], esi
mov word [ebp - 0x40], ax
call fcn.00403e20
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x28]
xor eax, eax
mov byte [ebp - 0xe9], 0
push 0xffffffffffffffff
push eax
mov word [ebp - 0x28], ax
lea eax, [ebp - 0xb8]
push eax
mov dword [ebp - 0xf0], esi
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], esi
call fcn.00403ab0
push 8
push esi
push str.https:__
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xa
call fcn.00410910
test eax, eax
jne 0x41267a
push 0xffffffffffffffff
push 8
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x28]
call fcn.00410760
push eax
mov edx, str.http:__
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x70]
call fcn.00413190
add esp, 4
mov edi, eax
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x412632
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x412615
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403f90
xor eax, eax
mov dword [ebp - 0x14], 7
push edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00403980
mov eax, dword [ebp - 0x5c]
cmp eax, 8
jb 0x412647
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00403f90
xor eax, eax
mov byte [ebp - 4], 0xa
mov word [ebp - 0x70], ax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x5c], 7
mov dword [ebp - 0x60], 0
cmp eax, 8
jb 0x41267a
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.00403f90
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0xf0]
push eax
lea edx, [ebp - 0xe9]
lea ecx, [ebp - 0x28]
call fcn.00411120
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 0xc
test al, al
jne 0x4126c3
lea ecx, [ebp - 0x28]
call fcn.00404060
lea ecx, [ebp - 0x40]
call fcn.00404060
lea ecx, [ebp - 0x58]
call fcn.00404060
xor edi, edi
jmp 0x412aa3
push 0
push 0
push 0
push 0
push 0x509aac
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xf8], eax
test eax, eax
je 0x4126a4
push 0x3e8
push 0x3e8
push 0x3e8
push 0x3e8
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
je 0x4126a4
mov bl, byte [ebp - 0xe9]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test bl, bl
je 0x412760
push 4
lea eax, [ebp - 0xf4]
mov dword [ebp - 0xf4], 0xaa0
push eax
push 0x54
push dword [ebp - 0xf8]
call edi
test eax, eax
jne 0x41274f
lea ecx, [ebp - 0x28]
call fcn.00404060
lea ecx, [ebp - 0x40]
call fcn.00404060
lea ecx, [ebp - 0x58]
call fcn.00404060
xor edi, edi
jmp 0x412a9d
mov eax, dword [ebp - 0xf0]
test eax, eax
jne 0x41276f
mov ecx, 0x1bb
jmp 0x412772
mov eax, dword [ebp - 0xf0]
mov ecx, 0x50
test eax, eax
je 0x412772
movzx ecx, ax
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
push 0
cmovae eax, dword [ebp - 0x58]
push ecx
push eax
push dword [ebp - 0xf8]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x104], ecx
test ecx, ecx
je 0x412730
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0x100
cmovae eax, dword [ebp - 0x40]
push 0
push 0
push str.HTTP_1.1
push eax
push 0x509ad8
push ecx
mov dword [ebp - 0x110], 4
mov dword [ebp - 0x124], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x412730
test bl, bl
je 0x412801
push 4
lea eax, [ebp - 0xf4]
mov dword [ebp - 0xf4], 0x3300
push eax
push 0x1f
push esi
call edi
test eax, eax
je 0x412730
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call edi
test eax, eax
je 0x412730
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
push 0
push esi
call ebx
test eax, eax
je 0x412730
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push 0x20000005
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x412730
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x412730
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0x100
cmovae eax, dword [ebp - 0x40]
push 0
push 0
push str.HTTP_1.1
push eax
mov eax, dword [ebp - 0x104]
push 0x509ad8
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x412730
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call edi
test eax, eax
je 0x412730
push 0
push esi
call ebx
test eax, eax
je 0x412730
xorps xmm0, xmm0
push 0x100000
movlpd qword [ebp - 0x130], xmm0
call fcn.004a1d88
mov ebx, dword [ebp - 0x128]
mov edi, eax
push 0
push ebx
call fcn.004c8869
add esp, 0xc
cmp eax, 0xffffffff
je 0x4128f9
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x108]
mov ebx, dword [ebp - 0x130]
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0xf0], eax
nop word [eax + eax]
xor ecx, ecx
cmp ecx, eax
jg 0x41296c
jl 0x412960
cmp dword [ebp - 0x108], ebx
ja 0x41296c
cmp dword [ebp - 0x10c], ecx
jbe 0x4129fc
push 0x100000
push 0
push edi
call fcn.004bac20
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x4129f6
lea eax, [ebp - 0x100]
push eax
push 0x100000
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov eax, dword [ebp - 0x100]
lea ecx, [ebp - 0x100]
push 0
push ecx
push eax
push edi
push dword [ebp - 0xf4]
add ebx, eax
adc dword [ebp - 0xf0], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0xfc]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0xf0]
test ecx, ecx
je 0x412950
mov eax, dword [ecx]
push 0
push dword [ebp - 0x100]
call dword [eax]
mov eax, dword [ebp - 0xf0]
jmp 0x412950
mov eax, dword [ebp - 0xf0]
push dword [ebp - 0xf4]
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x114], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004a1d77
mov eax, dword [ebp - 0x14]
add esp, 4
mov edi, 1
cmp eax, 8
jb 0x412a37
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403f90
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x18], 0
cmp eax, 8
jb 0x412a60
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00403f90
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], 0
cmp eax, 8
jb 0x412a89
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00403f90
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0xf8]
test eax, eax
je 0x412ab6
push eax
call ebx
mov eax, dword [ebp - 0x104]
test eax, eax
je 0x412ac3
push eax
call ebx
test esi, esi
je 0x412aca
push esi
call ebx
test edi, edi
je 0x412af1
mov eax, dword [ebp - 0x118]
cmp eax, dword [ebp - 0x120]
jne 0x412af1
mov eax, dword [ebp - 0x114]
cmp eax, dword [ebp - 0x11c]
jne 0x412af1
mov esi, 1
jmp 0x412af3
xor esi, esi
mov ecx, dword [ebp - 0xa4]
cmp ecx, 8
jb 0x412b11
inc ecx
push ecx
push dword [ebp - 0xb8]
lea ecx, [ebp - 0xb8]
call fcn.00403f90
mov eax, esi
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.004a1845
mov esp, ebp
pop ebp
ret 0x10