Function at 0x412170
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 0x4e323d
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x52610c]
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.004c6be3
add esp, 8
cmp eax, 0xffffffff
je 0x412348
test esi, esi
je 0x412348
push ebx
lea ecx, [ebp - 0xa0]
call fcn.00403ed0
push ecx
lea edx, [ebp - 0xa0]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xe8]
call fcn.0041fa30
mov edx, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xd0]
call fcn.0040f270
mov edx, eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x70]
call fcn.0041fb90
add esp, 4
mov eax, dword [ebp - 0xbc]
cmp eax, 0x10
jb 0x412234
inc eax
lea ecx, [ebp - 0xd0]
push eax
push dword [ebp - 0xd0]
call fcn.00409950
mov dword [ebp - 0xbc], 0xf
mov dword [ebp - 0xc0], 0
mov byte [ebp - 0xd0], 0
mov eax, dword [ebp - 0xd4]
cmp eax, 0x10
jb 0x41226d
inc eax
lea ecx, [ebp - 0xe8]
push eax
push dword [ebp - 0xe8]
call fcn.00409950
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 0x4122aa
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.00403f40
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.00403ed0
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.004033b0
add esp, 8
test eax, eax
jne 0x41232e
mov ecx, dword [ebp - 0xfc]
push dword [ecx + 0x10]
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [ebp - 0x88]
call fcn.00404010
lea ecx, [ebp - 0x70]
call fcn.00404010
mov eax, 1
jmp 0x412993
lea ecx, [ebp - 0x88]
call fcn.00404010
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0xffffffff
call fcn.00404010
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412350
sub ecx, edx
sar ecx, 1
jne 0x412368
xor eax, eax
jmp 0x412993
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.004118b0
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 0x5026d8
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.00403dd0
xor eax, eax
mov byte [ebp - 4], 8
push eax
push 0x5026d8
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], esi
mov word [ebp - 0x40], ax
call fcn.00403dd0
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.00403a60
push 8
push esi
push str.https:__
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xa
call fcn.00410790
test eax, eax
jne 0x4124fa
push 0xffffffffffffffff
push 8
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x28]
call fcn.004105e0
push eax
mov edx, str.http:__
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x70]
call fcn.00413010
add esp, 4
mov edi, eax
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x4124b2
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x412495
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403f40
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.00403930
mov eax, dword [ebp - 0x5c]
cmp eax, 8
jb 0x4124c7
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00403f40
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 0x4124fa
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.00403f40
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.00410fa0
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 0xc
test al, al
jne 0x412543
lea ecx, [ebp - 0x28]
call fcn.00404010
lea ecx, [ebp - 0x40]
call fcn.00404010
lea ecx, [ebp - 0x58]
call fcn.00404010
xor edi, edi
jmp 0x412923
push 0
push 0
push 0
push 0
push 0x507aac
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xf8], eax
test eax, eax
je 0x412524
push 0x3e8
push 0x3e8
push 0x3e8
push 0x3e8
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
je 0x412524
mov bl, byte [ebp - 0xe9]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test bl, bl
je 0x4125e0
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 0x4125cf
lea ecx, [ebp - 0x28]
call fcn.00404010
lea ecx, [ebp - 0x40]
call fcn.00404010
lea ecx, [ebp - 0x58]
call fcn.00404010
xor edi, edi
jmp 0x41291d
mov eax, dword [ebp - 0xf0]
test eax, eax
jne 0x4125ef
mov ecx, 0x1bb
jmp 0x4125f2
mov eax, dword [ebp - 0xf0]
mov ecx, 0x50
test eax, eax
je 0x4125f2
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 0x4125b0
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 0x507ad8
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 0x4125b0
test bl, bl
je 0x412681
push 4
lea eax, [ebp - 0xf4]
mov dword [ebp - 0xf4], 0x3300
push eax
push 0x1f
push esi
call edi
test eax, eax
je 0x4125b0
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 0x4125b0
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
push 0
push esi
call ebx
test eax, eax
je 0x4125b0
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 0x4125b0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x4125b0
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 0x507ad8
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x4125b0
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call edi
test eax, eax
je 0x4125b0
push 0
push esi
call ebx
test eax, eax
je 0x4125b0
xorps xmm0, xmm0
push 0x100000
movlpd qword [ebp - 0x130], xmm0
call fcn.004a01a9
mov ebx, dword [ebp - 0x128]
mov edi, eax
push 0
push ebx
call fcn.004c6be3
add esp, 0xc
cmp eax, 0xffffffff
je 0x412779
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 0x4127ec
jl 0x4127e0
cmp dword [ebp - 0x108], ebx
ja 0x4127ec
cmp dword [ebp - 0x10c], ecx
jbe 0x41287c
push 0x100000
push 0
push edi
call fcn.004b8fe0
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x412876
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 0x4127d0
mov eax, dword [ecx]
push 0
push dword [ebp - 0x100]
call dword [eax]
mov eax, dword [ebp - 0xf0]
jmp 0x4127d0
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.004a0198
mov eax, dword [ebp - 0x14]
add esp, 4
mov edi, 1
cmp eax, 8
jb 0x4128b7
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403f40
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 0x4128e0
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00403f40
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 0x412909
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00403f40
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 0x412936
push eax
call ebx
mov eax, dword [ebp - 0x104]
test eax, eax
je 0x412943
push eax
call ebx
test esi, esi
je 0x41294a
push esi
call ebx
test edi, edi
je 0x412971
mov eax, dword [ebp - 0x118]
cmp eax, dword [ebp - 0x120]
jne 0x412971
mov eax, dword [ebp - 0x114]
cmp eax, dword [ebp - 0x11c]
jne 0x412971
mov esi, 1
jmp 0x412973
xor esi, esi
mov ecx, dword [ebp - 0xa4]
cmp ecx, 8
jb 0x412991
inc ecx
push ecx
push dword [ebp - 0xb8]
lea ecx, [ebp - 0xb8]
call fcn.00403f40
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.0049fc55
mov esp, ebp
pop ebp
ret 0x10