Function at 0x403570
Capabilities:
Check http status code
Read http header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xa024
call fcn.00410c20
mov eax, dword [0x42b314]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0xa024], ecx
mov dword [ebp - 4], 4
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 0xa024]
add ecx, 0x70
push ecx
push 0
push 0x20000013
mov ecx, dword [ebp - 0xa024]
add ecx, 0xa0
call fcn.00403050
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x4035ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0xa024]
mov dword [edx + 0x6c], eax
mov eax, dword [ebp - 0xa024]
mov dword [eax + 0x68], 3
xor eax, eax
jmp 0x4039b1
mov dword [ebp - 4], 0x9fff
mov ecx, dword [ebp - 0xa024]
cmp dword [ecx + 0x70], 0xc8
je 0x4036b4
mov edx, dword [ebp - 0xa024]
cmp dword [edx + 0x70], 0x12d
je 0x403622
mov eax, dword [ebp - 0xa024]
cmp dword [eax + 0x70], 0x12e
jne 0x40368e
push 0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xa010]
push edx
push 0
push 0x21
mov ecx, dword [ebp - 0xa024]
add ecx, 0xa0
call fcn.00403050
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x40368e
lea eax, [ebp - 0xa010]
push eax
mov ecx, dword [ebp - 0xa024]
add ecx, 0x40
call fcn.00403fb0
push 0
mov ecx, dword [ebp - 0xa024]
add ecx, 0xa0
call fcn.00403080
mov ecx, dword [ebp - 0xa024]
call fcn.004030e0
movzx eax, al
neg eax
sbb eax, eax
jmp 0x4039b1
mov ecx, dword [ebp - 0xa024]
mov dword [ecx + 0x68], 3
mov edx, dword [ebp - 0xa024]
mov eax, dword [ebp - 0xa024]
mov ecx, dword [eax + 0x70]
mov dword [edx + 0x6c], ecx
xor eax, eax
jmp 0x4039b1
push 0
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 0xa024]
add eax, 0xac
push eax
push 0
push 0x20000005
mov ecx, dword [ebp - 0xa024]
add ecx, 0xa0
call fcn.00403050
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ecx, dword [ebp - 0xa024]
movzx edx, byte [ecx + 0x94]
test edx, edx
je 0x40370e
mov eax, dword [ebp - 0xa024]
mov ecx, dword [0x42c8b0]
add ecx, dword [eax + 0xac]
mov dword [0x42c8b0], ecx
mov edx, dword [ebp - 0xa024]
mov dword [edx + 0x68], 2
mov dword [ebp - 4], 0x9fff
mov dword [ebp - 8], 0
push 0
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0xa010]
push ecx
push 0
push 0x2f
mov ecx, dword [ebp - 0xa024]
add ecx, 0xa0
call fcn.00403050
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x403852
xor edx, edx
mov eax, dword [ebp - 4]
mov word [ebp + eax*2 - 0xa010], dx
push str.filename
lea ecx, [ebp - 0xa010]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov dword [ebp - 0xa014], eax
cmp dword [ebp - 0xa014], 0
je 0x403850
mov edx, dword [ebp - 0xa014]
add edx, 0x12
mov dword [ebp - 0xa014], edx
mov eax, dword [ebp - 0xa014]
movzx ecx, word [eax]
cmp ecx, 0x22
jne 0x4037b8
mov edx, dword [ebp - 0xa014]
add edx, 2
mov dword [ebp - 0xa014], edx
push 0x22
mov eax, dword [ebp - 0xa014]
push eax
call fcn.004039c0
add esp, 8
mov dword [ebp - 0xa018], eax
cmp dword [ebp - 0xa018], 0
je 0x4037e5
xor ecx, ecx
mov edx, dword [ebp - 0xa018]
mov word [edx], cx
jmp 0x40383b
push 0x20
mov eax, dword [ebp - 0xa014]
push eax
call fcn.004039c0
add esp, 8
mov dword [ebp - 0xa018], eax
cmp dword [ebp - 0xa018], 0
je 0x403810
xor ecx, ecx
mov edx, dword [ebp - 0xa018]
mov word [edx], cx
push 0x3b
mov eax, dword [ebp - 0xa014]
push eax
call fcn.004039c0
add esp, 8
mov dword [ebp - 0xa018], eax
cmp dword [ebp - 0xa018], 0
je 0x40383b
xor ecx, ecx
mov edx, dword [ebp - 0xa018]
mov word [edx], cx
mov eax, dword [ebp - 0xa014]
push eax
mov ecx, dword [ebp - 0xa024]
add ecx, 8
call fcn.00403fb0
jmp 0x40385b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0x9fff
mov ecx, dword [ebp - 0xa024]
add ecx, 8
call fcn.00403ff0
movzx ecx, al
test ecx, ecx
je 0x4039a3
push 0
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0xa010]
push eax
push 0
push 0x80000015
mov ecx, dword [ebp - 0xa024]
add ecx, 0xa0
call fcn.00403050
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x4039a3
xor ecx, ecx
mov edx, dword [ebp - 4]
mov word [ebp + edx*2 - 0xa010], cx
push 0x20
lea eax, [ebp - 0xa010]
push eax
call fcn.004039c0
add esp, 8
mov dword [ebp - 0xa01c], eax
cmp dword [ebp - 0xa01c], 0
jne 0x4038ea
lea ecx, [ebp - 0xa010]
mov dword [ebp - 0xa01c], ecx
jmp 0x4038f9
mov edx, dword [ebp - 0xa01c]
add edx, 2
mov dword [ebp - 0xa01c], edx
push 0x20
mov eax, dword [ebp - 0xa01c]
push eax
call fcn.004039c0
add esp, 8
mov dword [ebp - 0xa020], eax
cmp dword [ebp - 0xa020], 0
je 0x403924
xor ecx, ecx
mov edx, dword [ebp - 0xa020]
mov word [edx], cx
push 0x3f
mov eax, dword [ebp - 0xa01c]
push eax
call fcn.004039c0
add esp, 8
mov dword [ebp - 0xa020], eax
cmp dword [ebp - 0xa020], 0
je 0x40394f
xor ecx, ecx
mov edx, dword [ebp - 0xa020]
mov word [edx], cx
push 0x2f
mov eax, dword [ebp - 0xa01c]
push eax
call fcn.004039e0
add esp, 8
mov dword [ebp - 0xa020], eax
cmp dword [ebp - 0xa020], 0
jne 0x40397d
mov ecx, dword [ebp - 0xa01c]
mov dword [ebp - 0xa020], ecx
jmp 0x40398c
mov edx, dword [ebp - 0xa020]
add edx, 2
mov dword [ebp - 0xa020], edx
mov eax, dword [ebp - 0xa020]
push eax
mov ecx, dword [ebp - 0xa024]
add ecx, 8
call fcn.00403fb0
jmp 0x4039ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0040fee0
mov esp, ebp
pop ebp
ret