Function at 0x439c28
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Set http header
Write file on windows

Disassembly:
push ebp
sub esp, 0xc7c
lea ebp, [esp - 4]
mov eax, dword [0x551bd0]
xor eax, ebp
mov dword [ebp + 0xc7c], eax
push 0xc4
mov eax, 0x508b65
call fcn.0049dfed
mov esi, ecx
mov eax, dword [esi + 0x20]
mov ecx, dword [ebp + 0xc88]
xor ebx, ebx
cmp eax, ebx
ja 0x439c6f
mov dword [esi + 0x1a4], 3
jmp 0x43a615
push ecx
lea ecx, [ebp + 0x1c]
call fcn.00403757
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
mov dword [ebp - 4], ebx
jae 0x439c87
lea eax, [ebp + 0x20]
mov edi, 0x53900c
push edi
push eax
call fcn.0049bf35
pop ecx
pop ecx
test eax, eax
je 0x439cbb
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x439ca5
lea eax, [ebp + 0x20]
mov edi, 0x513a0c
push edi
push eax
call fcn.0049bf35
pop ecx
pop ecx
test eax, eax
jne 0x43a600
push edi
lea ecx, [ebp + 0x1c]
call fcn.00401829
cmp dword [esi], ebx
jne 0x439cfe
lea eax, [esi + 0x13c]
cmp dword [eax + 0x18], 8
jb 0x439cd9
mov eax, dword [eax + 4]
jmp 0x439cdc
add eax, 4
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi], eax
cmp eax, ebx
jne 0x439cfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
jmp 0x43a60a
push dword [esi + 0x1a0]
push dword [esi + 0x19c]
push dword [esi + 0x198]
push dword [esi + 0x194]
push dword [esi]
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
xor eax, eax
push 0x206
mov word [ebp + 0xa60], ax
lea eax, [ebp + 0xa62]
push ebx
push eax
call fcn.0049d740
xor eax, eax
push 0xa26
mov word [ebp + 0x38], ax
lea eax, [ebp + 0x3a]
push ebx
push eax
call fcn.0049d740
push 0x38
lea eax, [ebp - 0x94]
push ebx
push eax
call fcn.0049d740
mov ecx, dword [esi + 0x20]
lea eax, [ebp + 0xa60]
xor edi, edi
mov dword [ebp - 0x88], eax
inc edi
add esp, 0x24
cmp dword [esi + 0x24], 8
lea eax, [ebp + 0x38]
mov dword [ebp - 0x98], 0x3c
mov dword [ebp - 0x84], 0x104
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], 0x514
mov dword [ebp - 0x90], edi
jb 0x439da4
mov eax, dword [esi + 0x10]
jmp 0x439da7
lea eax, [esi + 0x10]
lea edx, [ebp - 0x98]
push edx
push ebx
push ecx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x439dc2
push ebx
push edi
jmp 0x43a60d
lea eax, [ebp + 0xa60]
push eax
lea ecx, [esi + 0x28]
call fcn.00401829
push ebx
push dword [ebp - 0x80]
lea eax, [ebp + 0xa60]
push eax
push dword [esi]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov dword [ebp - 0x50], edi
cmp edi, ebx
je 0x439ced
cmp dword [ebp - 0x8c], 2
jne 0x439e01
mov ecx, 0x800000
jmp 0x439e03
xor ecx, ecx
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x439e0f
lea eax, [ebp + 0x20]
push ecx
push ebx
push ebx
push ebx
push dword [ebp - 0x6c]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x439e31
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x43a60a
cmp byte [esi + 8], bl
jne 0x439e55
cmp dword [ebp - 0x8c], 2
jne 0x439e55
push 4
lea ecx, [ebp - 0x30]
push ecx
push 0x1f
push eax
mov dword [ebp - 0x30], 0x3100
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov byte [ebp - 0x19], bl
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x34]
inc dword [ebp - 0x34]
cmp eax, 3
jae 0x43a5d8
mov ecx, dword [esi + 0x118]
mov byte [ebp - 0xd], 1
cmp ecx, ebx
jbe 0x439eb0
lea eax, [esi + 0x104]
cmp dword [eax + 0x18], 8
jb 0x439e8d
mov eax, dword [eax + 4]
jmp 0x439e90
add eax, 4
push 0x1000000
push ecx
push eax
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x439eb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
cmp dword [esi + 0xfc], ebx
jbe 0x439f17
push 0x513d60
lea ecx, [ebp]
call fcn.00401685
push 0xffffffffffffffff
push ebx
lea eax, [esi + 0xe8]
push eax
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.004039ea
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x439ee7
lea eax, [ebp + 4]
push 0x1000000
push dword [ebp + 0x14]
push eax
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x439f09
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
push ebx
push 1
lea ecx, [ebp]
mov byte [ebp - 4], bl
call fcn.0040184d
mov ecx, dword [esi + 0x134]
cmp ecx, ebx
jbe 0x43a042
xor eax, eax
lea edi, [ebp - 0x58]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ecx + 1]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
mov dword [ebp - 0x5c], 3
neg ecx
or ecx, eax
push ecx
call fcn.00499a0f
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x43a60a
mov eax, dword [esi + 0x134]
lea eax, [eax + eax + 2]
push eax
push ebx
push dword [ebp - 0x24]
call fcn.0049d740
lea eax, [esi + 0x120]
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x439f7e
mov eax, dword [eax + 4]
jmp 0x439f81
add eax, 4
mov ecx, dword [esi + 0x134]
mov edi, dword [ebp - 0x24]
push eax
inc ecx
push ecx
push edi
call fcn.0049b0d6
add esp, 0xc
push 0xc
lea eax, [ebp - 0x5c]
push eax
push 0x26
push dword [esi + 4]
mov dword [ebp - 0x58], edi
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
call edi
test eax, eax
jne 0x439fbc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
push dword [ebp - 0x24]
call fcn.0049ac10
pop ecx
mov ecx, dword [esi + 0x170]
mov dword [ebp - 0x58], ebx
cmp ecx, ebx
jbe 0x43a048
lea eax, [esi + 0x15c]
cmp dword [eax + 0x18], 8
jb 0x439fe3
mov eax, dword [eax + 4]
jmp 0x439fe6
add eax, 4
add ecx, ecx
push ecx
push eax
push 0x1002
push dword [esi + 4]
call edi
test eax, eax
jne 0x43a004
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
mov ecx, dword [esi + 0x18c]
cmp ecx, ebx
jbe 0x43a048
lea eax, [esi + 0x178]
cmp dword [eax + 0x18], 8
jb 0x43a01f
mov eax, dword [eax + 4]
jmp 0x43a022
add eax, 4
add ecx, ecx
push ecx
push eax
push 0x1003
push dword [esi + 4]
call edi
test eax, eax
jne 0x43a048
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
jmp 0x43a048
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
cmp byte [ebp + 0xc8c], bl
je 0x43a074
push 4
lea eax, [ebp - 0x28]
push eax
push 0x3f
push dword [esi + 4]
mov dword [ebp - 0x28], 2
call edi
test eax, eax
jne 0x43a074
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
push dword [esi + 4]
mov ecx, esi
call fcn.0043921e
cmp eax, ebx
jne 0x43a098
push dword [esi + 4]
mov ecx, esi
call fcn.004392dd
cmp eax, ebx
jne 0x43a098
mov byte [ebp - 0xd], bl
jmp 0x43a5cf
push ebx
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x43a0ba
mov byte [ebp - 0xd], bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
jmp 0x43a5cf
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push 0x16
push dword [esi + 4]
mov dword [ebp - 0x18], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp eax, ebx
jne 0x43a39a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x43a39a
mov eax, dword [ebp - 0x18]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00499a0f
mov edi, eax
pop ecx
mov dword [ebp - 0x28], edi
cmp edi, ebx
je 0x43a39a
mov eax, dword [ebp - 0x18]
add eax, eax
push eax
push ebx
push edi
call fcn.0049d740
add esp, 0xc
push ebx
lea eax, [ebp - 0x18]
push eax
push edi
push ebx
push 0x16
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x43a391
push dword [ebp - 0x28]
lea edi, [esi + 0x44]
mov ecx, edi
call fcn.00401829
lea ecx, [ebp - 0x4c]
call fcn.00439864
push 0x535d58
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.00401685
mov byte [ebp - 4], 3
cmp byte [esi + 0x158], bl
jne 0x43a1b2
push str.charset_A_Za_z0_9___
lea ecx, [ebp]
call fcn.00401829
push ebx
lea eax, [ebp - 0x4c]
push eax
push edi
push 1
lea eax, [ebp]
push ebx
push eax
call fcn.004398cd
add esp, 0x18
test al, al
je 0x43a1b2
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x40]
push 0x1c
cdq
pop ecx
idiv ecx
test eax, eax
jbe 0x43a1b2
push ebx
lea ecx, [ebp - 0x4c]
call fcn.00439249
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esi + 0x60]
call fcn.004019f3
push str.Content_Length:__0_9_
lea ecx, [ebp]
call fcn.00401829
push ebx
lea eax, [ebp - 0x4c]
push eax
push edi
push 1
lea eax, [ebp]
push ebx
push eax
call fcn.004398cd
add esp, 0x18
test al, al
je 0x43a20c
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x40]
push 0x1c
cdq
pop ecx
idiv ecx
test eax, eax
jbe 0x43a20c
push ebx
lea ecx, [ebp - 0x4c]
call fcn.00439249
cmp dword [eax + 0x18], 8
jb 0x43a1fc
mov eax, dword [eax + 4]
jmp 0x43a1ff
add eax, 4
push eax
call fcn.0049ada9
pop ecx
mov dword [esi + 0xdc], eax
push str.Location:___r_n_
lea ecx, [ebp]
call fcn.00401829
push ebx
lea eax, [ebp - 0x4c]
push eax
push edi
push 1
lea eax, [ebp]
push ebx
push eax
call fcn.004398cd
add esp, 0x18
test al, al
je 0x43a25a
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x40]
push 0x1c
cdq
pop ecx
idiv ecx
test eax, eax
jbe 0x43a25a
push ebx
lea ecx, [ebp - 0x4c]
call fcn.00439249
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esi + 0x98]
call fcn.004019f3
push str.Set_Cookie:_b.__r
lea ecx, [ebp]
call fcn.00401829
lea edi, [esi + 0xb8]
mov ecx, edi
call fcn.00424fcc
push ebx
lea eax, [ebp - 0x4c]
push eax
lea eax, [esi + 0x44]
push eax
push 1
lea eax, [ebp]
push ebx
push eax
call fcn.004398cd
add esp, 0x18
test al, al
je 0x43a372
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x40]
push 0x1c
cdq
pop ecx
idiv ecx
cmp eax, ebx
jbe 0x43a372
mov dword [ebp - 0x14], ebx
push dword [ebp - 0x14]
lea ecx, [ebp - 0x4c]
call fcn.00439249
push 0xffffffffffffffff
push ebx
push eax
mov ecx, edi
call fcn.004039ea
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x40]
push 0x1c
cdq
pop ecx
idiv ecx
dec eax
cmp dword [ebp - 0x14], eax
je 0x43a2df
push 0x513c98
mov ecx, edi
call fcn.00403850
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x40]
push 0x1c
cdq
pop ecx
idiv ecx
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], eax
jb 0x43a2ab
push 0x513c94
lea ecx, [ebp - 0xb4]
call fcn.00401685
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0xd0]
push edi
push eax
mov byte [ebp - 4], 4
call fcn.00439613
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.004019f3
push ebx
push 1
lea ecx, [ebp - 0xd0]
call fcn.0040184d
push ebx
push 1
lea ecx, [ebp - 0xb4]
mov byte [ebp - 4], 3
call fcn.0040184d
mov eax, dword [esi + 0xcc]
cmp eax, ebx
jbe 0x43a372
dec eax
push eax
mov ecx, edi
call fcn.004242e1
cmp word [eax], 0x3b
je 0x43a372
push 0x5384f4
mov ecx, edi
call fcn.00403850
push ebx
push 1
lea ecx, [ebp]
call fcn.0040184d
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], bl
call fcn.00439891
push dword [ebp - 0x4c]
call fcn.0049a490
pop ecx
push dword [ebp - 0x28]
call fcn.0049ac10
pop ecx
lea ecx, [esi + 0x44]
call fcn.00424fcc
lea ecx, [esi + 0xb8]
call fcn.00424fcc
xor eax, eax
mov word [ebp + 0xc68], ax
lea edi, [ebp + 0xc6a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
stosw word es:[edi], ax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0xc68]
push eax
push ebx
push 0x13
push dword [esi + 4]
mov dword [ebp - 0x18], 0xa
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x43a3f8
lea eax, [ebp + 0xc68]
push eax
call fcn.0049ada9
pop ecx
mov dword [esi + 0xb4], eax
mov eax, dword [esi + 0xd4]
cmp eax, ebx
je 0x43a40f
push eax
call fcn.0049ac10
pop ecx
mov dword [esi + 0xd4], ebx
or dword [ebp - 0x24], 0xffffffff
cmp dword [esi + 0x1ac], 2
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
jne 0x43a44f
lea eax, [esi + 0x1b0]
cmp dword [eax + 0x18], 8
jb 0x43a433
mov eax, dword [eax + 4]
jmp 0x43a436
add eax, 4
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x18]
push eax
push dword [esi + 4]
mov dword [ebp - 0x18], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x43a578
cmp dword [ebp - 0x18], ebx
jbe 0x43a578
push dword [ebp - 0x20]
mov ecx, esi
call fcn.00439177
mov eax, dword [ebp - 0x18]
inc eax
push eax
call fcn.00499a0f
mov edi, eax
pop ecx
mov dword [ebp - 0x28], edi
cmp edi, ebx
je 0x43a5a6
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x2c], ebx
push edi
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x43a56d
cmp dword [esi + 0x1ac], 2
jne 0x43a4e8
push ebx
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x30], ebx
push edi
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x43a58f
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x30]
jne 0x43a58f
add dword [ebp - 0x20], eax
jmp 0x43a56d
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
add eax, ecx
cmp eax, dword [ebp - 0x14]
jb 0x43a54d
mov ecx, dword [ebp - 0x14]
add ecx, ecx
mov dword [ebp - 0x14], ecx
cmp eax, ecx
jb 0x43a505
inc eax
mov dword [ebp - 0x14], eax
push dword [ebp - 0x14]
mov edi, dword [esi + 0xd4]
call fcn.00499a0f
pop ecx
mov dword [esi + 0xd4], eax
cmp eax, ebx
je 0x43a597
push dword [ebp - 0x14]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
cmp edi, ebx
je 0x43a54d
cmp dword [ebp - 0x20], ebx
jbe 0x43a546
push dword [ebp - 0x20]
push edi
push dword [esi + 0xd4]
call fcn.0049d7c0
add esp, 0xc
push edi
call fcn.0049ac10
pop ecx
push dword [ebp - 0x2c]
mov eax, dword [esi + 0xd4]
mov edi, dword [ebp - 0x20]
push dword [ebp - 0x28]
add eax, edi
push eax
call fcn.0049d7c0
add esp, 0xc
add edi, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edi
push dword [ebp - 0x28]
call fcn.0049ac10
pop ecx
jmp 0x43a584
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1a4], eax
cmp dword [ebp - 0x18], ebx
ja 0x43a44f
jmp 0x43a5a9
push edi
call fcn.0049ac10
jmp 0x43a5a5
push dword [ebp - 0x28]
call fcn.0049ac10
mov dword [esi + 0xd4], edi
pop ecx
mov byte [ebp - 0xd], bl
cmp dword [ebp - 0x24], 0xffffffff
je 0x43a5b8
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x20]
push edi
mov ecx, esi
call fcn.00439177
mov al, byte [ebp - 0xd]
mov dword [esi + 0xd8], edi
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], bl
je 0x439e5f
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp eax, ebx
je 0x43a5eb
push eax
call edi
mov dword [esi + 4], ebx
push dword [ebp - 0x50]
call edi
push ebx
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
mov al, byte [ebp - 0xd]
jmp 0x43a617
mov dword [esi + 0x1a4], 0x57
push ebx
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xc7c]
xor ecx, ebp
call fcn.0049a49b
add ebp, 0xc80
leave
ret 8