Function at 0x4034f0
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b530
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc30
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov eax, dword [ebx + 0x10]
xor edi, edi
mov dword [ebp - 0x10], esp
cmp eax, edi
mov dword [ebp - 0x24], 0x190
mov dword [ebp - 4], edi
mov dword [ebx + 4], edi
push edi
jne 0x403533
push edi
push edi
push edi
jmp 0x40353e
mov eax, dword [ebx + 0x20]
push str._local_
push eax
push 3
push str.SelectRebatesDownloader
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x2c], esi
jne 0x403562
mov ecx, dword [ebp + 8]
push 0x1f3
push ecx
mov ecx, ebx
jmp 0x403c18
mov edx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebx + 0x18]
push edi
push edi
push 3
push edx
push eax
push 0x50
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, edi
mov dword [ebp - 0x34], eax
jne 0x403599
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [ebp + 8]
push 0x1f3
push edx
mov ecx, ebx
jmp 0x403c18
push 8
call fcn.0040505f
mov edi, dword [ebx + 0x38]
mov dword [ebp - 0x20], eax
add esp, 4
mov dword [ebp - 0x1c], 0x84000000
mov esi, str.POST
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4035db
test cl, cl
je 0x4035d7
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4035db
add eax, 2
add esi, 2
test cl, cl
jne 0x4035b7
xor eax, eax
jmp 0x4035e0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40363a
mov esi, 0x40e2fc
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40360f
test cl, cl
je 0x40360b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40360f
add eax, 2
add esi, 2
test cl, cl
jne 0x4035eb
xor eax, eax
jmp 0x403614
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40363a
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x2c]
mov dword [ecx], eax
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x403647
mov edi, dword [ebx + 0x30]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x403647
xor ecx, ecx
jmp 0x40364a
mov edx, dword [ebp - 0x20]
xor ecx, ecx
mov dword [edx], 0x40e2f8
jmp 0x40364a
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x34]
push 0
push ecx
mov dword [eax + 4], 0
mov ecx, dword [ebx + 0x38]
push eax
mov eax, dword [ebx + 0x1c]
push 0
push str.HTTP_1.1
push eax
push ecx
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, dword [ebx + 0x38]
mov dword [ebp - 0x18], eax
mov esi, str.HEAD
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4036a2
test cl, cl
je 0x40369e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4036a2
add eax, 2
add esi, 2
test cl, cl
jne 0x40367e
xor eax, eax
jmp 0x4036a7
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4036df
mov esi, 0x40e2e0
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4036d6
test cl, cl
je 0x4036d2
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4036d6
add eax, 2
add esi, 2
test cl, cl
jne 0x4036b2
xor eax, eax
jmp 0x4036db
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403708
mov edx, dword [ebx + 0x3c]
test edx, edx
je 0x403708
mov edi, 0x4116f8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x403be8
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x83c]
mov esi, str.POST
rep stosd dword es:[edi], eax
mov edi, dword [ebx + 0x38]
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403750
test cl, cl
je 0x40374c
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403750
add eax, 2
add esi, 2
test cl, cl
jne 0x40372c
xor eax, eax
jmp 0x403755
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403869
mov esi, 0x40e2fc
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403788
test cl, cl
je 0x403784
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403788
add eax, 2
add esi, 2
test cl, cl
jne 0x403764
xor eax, eax
jmp 0x40378d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403869
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x4038ed
mov edx, dword [ebx + 0x30]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4038ed
or ecx, 0xffffffff
mov edi, str.Expires:
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [ebp - 0x83c]
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, ebx
lea ebx, [ebp - 0x83c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [ebp - 0x83c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._r_nPragma:_no_cache_r_nCache_Control:_no_cache__must_revalidate_r_nIf_Modified_Since:
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [ebp - 0x83c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [ebp + 0xc]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4038ed
or ecx, 0xffffffff
mov edi, str.Content_Type:
xor eax, eax
lea edx, [ebp - 0x83c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x83c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x2c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x83c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40e13c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x40]
mov ecx, dword [ebx + 0x3c]
push eax
push ecx
lea edi, [ebp - 0x83c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x83c]
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 0x18]
not ecx
dec ecx
push ecx
push edx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x403bda
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x43c]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x43c]
push ecx
push edx
push 0x13
push eax
mov dword [ebp - 0x14], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x403bda
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x43c]
push edx
mov byte [ebp + ecx - 0x43c], 0
call fcn.00404e02
add esp, 4
xor ecx, ecx
cmp eax, 0xc8
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x28], ecx
jne 0x403b88
mov edx, dword [ebp - 0x18]
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x43c]
rep stosd dword es:[edi], eax
push eax
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x43c]
push eax
push ecx
push 0xb
push edx
mov dword [ebp - 0x14], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x403a12
mov eax, dword [ebp - 0x14]
mov byte [ebp + eax - 0x43c], 0
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x4039d2
push eax
call fcn.004041f0
add esp, 4
lea edi, [ebp - 0x43c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.004047ef
mov edx, eax
lea edi, [ebp - 0x43c]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
mov dword [ebx + 0x30], edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x38]
mov esi, str.HEAD
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403a44
test cl, cl
je 0x403a3a
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403a44
add eax, 2
add esi, 2
test cl, cl
jne 0x403a1a
xor eax, eax
jmp 0x403a49
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403a9c
mov edx, dword [ebp - 0x18]
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x43c]
rep stosd dword es:[edi], eax
push eax
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x43c]
push eax
push ecx
push 5
push edx
mov dword [ebp - 0x14], 0x400
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x403a9c
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x43c]
push ecx
mov byte [ebp + eax - 0x43c], 0
call fcn.00404e02
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x38]
mov esi, str.HEAD
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403ac8
test cl, cl
je 0x403ac4
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403ac8
add eax, 2
add esi, 2
test cl, cl
jne 0x403aa4
xor eax, eax
jmp 0x403acd
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403b88
mov eax, dword [ebx + 0x34]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x403b88
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x30], 1
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0xc3c]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0xc]
test byte [ecx + 0x50], 1
je 0x403b2f
mov edx, ecx
mov eax, dword [edx + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_PulseEvent]
jmp 0x403b3c
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0xc3c]
push 0x400
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x403b7e
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x403b7e
mov ecx, dword [ebp - 0x28]
push 0
add ecx, eax
lea edx, [ebp - 0xc3c]
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x3c]
push ecx
push eax
push edx
push esi
call ebx
test eax, eax
jne 0x403b09
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x38]
mov esi, str.HEAD
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x38]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x403bbe
test cl, cl
je 0x403bba
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x403bbe
add eax, 2
add esi, 2
test cl, cl
jne 0x403b96
xor eax, eax
jmp 0x403bc3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403bda
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x403bda
cmp eax, dword [ebp - 0x28]
je 0x403bda
mov dword [ebp - 0x24], 0x190
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push eax
call esi
jmp 0x403bee
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00404706
mov edx, dword [ebp - 0x34]
add esp, 4
push edx
call esi
mov eax, dword [ebp - 0x2c]
push eax
call esi
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
push edx
call fcn.00403050
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret