Function at 0x4047a0
Capabilities:
Check http status code
Clear file content
Read http header

Disassembly:
push 0xffffffffffffffff
push 0x43c188
mov eax, dword fs:[0]
push eax
sub esp, 0x5e8
mov eax, dword [0x449f6c]
xor eax, esp
mov dword [esp + 0x5e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x449f6c]
xor eax, esp
push eax
lea eax, [esp + 0x5fc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x60c]
xor esi, esi
lea eax, [ebp + 0x18c]
push ebp
lea ebx, [esi + 0x16]
call fcn.004046e0
xor ebx, ebx
mov esi, eax
push ebx
cmp esi, ebx
je 0x40485c
mov eax, dword [ebp + 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x404819
mov dword [ebp + 0x108], 0xf4240
jmp 0x40481f
mov dword [ebp + 0x108], esi
mov eax, dword [ebp + 0x50]
test eax, eax
je 0x404830
mov ecx, dword [ebp + 0x50]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, esi
mov ecx, dword [esp + 0x5fc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x5e0]
xor ecx, esp
call fcn.004239c1
add esp, 0x5f4
ret 4
mov eax, dword [ebp + 0x50]
lea edx, [esp + 0x1c]
push edx
lea edi, [ebp + 0x238]
push edi
push ebx
push 0x20000013
push eax
mov dword [esp + 0x30], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x4048c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp + 0x110]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4048aa
mov dword [ebp + 0x108], 0xf4240
jmp 0x4048b0
mov dword [ebp + 0x108], esi
mov ecx, dword [ebp + 0x50]
test ecx, ecx
je 0x404830
mov edx, dword [ebp + 0x50]
push edx
jmp 0x40482a
mov eax, dword [edi]
cmp eax, 0x64
jb 0x404e44
cmp eax, 0x1f9
ja 0x404e44
lea ecx, [ebp + 0x138]
mov esi, 0x4420bc
call fcn.0040b4b0
test al, al
je 0x404e2c
lea edi, [ebp + 0x1a8]
call fcn.0040e510
mov dword [esp + 0x40], ebx
jmp 0x404912
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x1f0], 7
mov dword [esp + 0x1ec], ebx
mov word [esp + 0x1dc], ax
lea ebx, [eax + 0x2b]
push ebp
lea esi, [esp + 0x44]
lea eax, [esp + 0x1dc]
mov dword [esp + 0x608], 1
call fcn.004046e0
mov esi, eax
test esi, esi
jne 0x404988
cmp dword [ebp + 0x1bc], eax
jbe 0x404967
push 0x4420e4
mov ecx, edi
call fcn.004076e0
lea eax, [esp + 0x1d8]
call fcn.00401a20
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x1e0]
push ecx
mov ecx, edi
call fcn.00409be0
jmp 0x4049b2
cmp dword [ebp + 0x1bc], 0
jbe 0x4049b2
lea edx, [esp + 0x60]
push edx
call fcn.00407890
call fcn.00407b40
cmp word [eax], 0x3b
je 0x4049b2
push 0x3b
mov eax, 1
call fcn.00407710
mov dword [esp + 0x604], 0xffffffff
cmp dword [esp + 0x1f0], 8
jb 0x4049d7
mov eax, dword [esp + 0x1dc]
push eax
call fcn.00423e76
add esp, 4
test esi, esi
je 0x404910
xor esi, esi
lea eax, [ebp + 0x1c4]
push ebp
lea ebx, [esi + 0xb]
call fcn.004046e0
xor eax, eax
cmp dword [ebp + 0x1d8], eax
jne 0x404a00
mov dword [ebp + 0x258], eax
xor ecx, ecx
mov dword [esp + 0x1b8], 7
mov dword [esp + 0x1b4], eax
mov word [esp + 0x1a4], cx
push ebp
xor esi, esi
lea ebx, [ecx + 1]
lea eax, [esp + 0x1a4]
mov dword [esp + 0x608], 2
call fcn.004046e0
cmp dword [esp + 0x1b4], esi
je 0x404af4
lea edx, [esp + 0x1a0]
push edx
mov edx, str.charset
call fcn.0040e230
cmp eax, 0xffffffff
je 0x404af4
push 0x1fe
lea ecx, [esp + 0x3fa]
xor eax, eax
push esi
push ecx
mov word [esp + 0x400], ax
call fcn.00428a90
add esp, 0xc
push 0x1fe
lea eax, [esp + 0x1fa]
xor edx, edx
push esi
push eax
mov word [esp + 0x200], dx
call fcn.00428a90
mov eax, dword [esp + 0x1b0]
add esp, 0xc
cmp dword [esp + 0x1b8], 8
jae 0x404ab9
lea eax, [esp + 0x1a4]
push 0x100
lea ecx, [esp + 0x1f8]
push ecx
push 0x100
lea edx, [esp + 0x400]
push edx
push str.______charset_s
push eax
call fcn.004245b0
add esp, 0x18
lea eax, [esp + 0x1f4]
push eax
lea ecx, [ebp + 0x1e0]
call fcn.0040eaa0
mov edi, dword [ebp + 0x238]
cmp edi, 0xc8
jne 0x404b78
mov eax, dword [ebp + 0x50]
push esi
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push esi
push 0x20000005
push eax
mov dword [ebp + 0x268], esi
mov dword [ebp + 0x26c], esi
mov dword [ebp + 0x218], esi
mov dword [ebp + 0x21c], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x30], 8
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x404c9c
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [ebp + 0x228], eax
add eax, 0xffffffff
mov dword [ebp + 0x22c], ecx
adc ecx, 0xffffffff
mov dword [ebp + 0x220], eax
mov dword [ebp + 0x224], ecx
jmp 0x404c9c
cmp edi, 0xce
jne 0x404e08
xor ecx, ecx
mov dword [esp + 0x1d4], 7
mov dword [esp + 0x1d0], esi
mov word [esp + 0x1c0], cx
push ebp
xor esi, esi
lea ebx, [ecx + 0x35]
lea eax, [esp + 0x1c0]
mov byte [esp + 0x608], 3
call fcn.004046e0
xor ecx, ecx
cmp eax, ecx
jne 0x404de0
cmp dword [esp + 0x1d4], 8
mov eax, dword [esp + 0x1c0]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
jae 0x404bf4
lea eax, [esp + 0x1c0]
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x2c]
push edx
push str.bytes__I64u__I64u__I64u
push eax
call fcn.004245b0
add esp, 0x14
cmp eax, 3
jne 0x404da7
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
cmp ecx, ebx
ja 0x404da7
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
jb 0x404c3c
cmp eax, edx
ja 0x404da7
mov edi, dword [esp + 0x38]
cmp ebx, edi
ja 0x404da7
mov esi, dword [esp + 0x34]
jb 0x404c56
cmp edx, esi
jae 0x404da7
mov dword [ebp + 0x21c], ecx
mov dword [ebp + 0x26c], ecx
lea ecx, [esp + 0x1bc]
mov dword [ebp + 0x218], eax
mov dword [ebp + 0x220], edx
mov dword [ebp + 0x224], ebx
mov dword [ebp + 0x228], esi
mov dword [ebp + 0x22c], edi
mov dword [ebp + 0x268], eax
mov byte [esp + 0x604], 2
call fcn.0040e6a0
xor esi, esi
mov eax, dword [ebp + 0x260]
cmp eax, 0xffffffff
je 0x404d4b
mov ecx, dword [ebp + 0x26c]
mov edx, dword [ebp + 0x268]
push esi
push esi
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x404d00
push 0x4422bc
lea ecx, [esp + 0x88]
call fcn.0040ece0
lea eax, [esp + 0x84]
push eax
lea edi, [esp + 0xdc]
mov byte [esp + 0x608], 5
call fcn.00401690
push 0x444ba4
mov ecx, edi
push ecx
call fcn.004257eb
mov eax, dword [ebp + 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x404d4b
push 0x4422d0
lea ecx, [esp + 0xc0]
call fcn.0040ece0
lea edx, [esp + 0xbc]
push edx
lea edi, [esp + 0x12c]
mov byte [esp + 0x608], 6
call fcn.00401690
push 0x444ba4
mov eax, edi
push eax
call fcn.004257eb
mov ecx, dword [ebp + 0x50]
push esi
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x404d94
push 0x4422e0
lea ecx, [esp + 0xa4]
call fcn.0040ece0
lea edx, [esp + 0xa0]
push edx
lea edi, [esp + 0x104]
mov byte [esp + 0x608], 7
call fcn.00401690
push 0x444ba4
mov eax, edi
push eax
call fcn.004257eb
lea ecx, [esp + 0x1a0]
call fcn.0040e6a0
xor eax, eax
jmp 0x404832
push str.Content_Range
lea ecx, [esp + 0x6c]
call fcn.0040ece0
lea ecx, [esp + 0x68]
push ecx
lea ecx, [esp + 0x154]
mov byte [esp + 0x608], 4
call fcn.0040e640
push 0x444c90
lea edx, [esp + 0x154]
push edx
call fcn.004257eb
mov edi, eax
mov esi, ebp
call fcn.00404610
lea ecx, [esp + 0x1bc]
mov esi, eax
call fcn.0040e6a0
lea ecx, [esp + 0x1a0]
call fcn.0040e6a0
jmp 0x404830
mov esi, ebp
cmp edi, 0x130
jne 0x404e14
xor edi, edi
call fcn.00404610
lea ecx, [esp + 0x1a0]
mov esi, eax
call fcn.0040e6a0
jmp 0x404830
mov edi, dword [edi]
mov esi, ebp
cmp edi, 0xc8
jne 0x404e3a
xor edi, edi
call fcn.00404610
jmp 0x404832
push 0x13
push str.invalid_status_code
lea ecx, [esp + 0x4c]
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
call fcn.0040ec00
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x17c]
push ecx
mov dword [esp + 0x60c], ebx
call fcn.0040e380
push 0x444bdc
lea edx, [esp + 0x17c]
push edx
call fcn.004257eb
int3