Function at 0x42b860
Capabilities:
Initialize winhttp library
Prepare http request
Print debug messages
Receive http response
Set http header
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c2125
mov eax, dword fs:[0]
push eax
mov eax, 0x142b4
call fcn.00486600
mov eax, dword [0x4f840c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x2c]
mov edi, dword [ebp + 0x28]
mov dword [ebp - 0x142ac], eax
mov dword [ebp - 0x142a4], ecx
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push 0x4e2958
mov dword [ebp - 4], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x142a8], eax
cmp eax, ebx
je 0x42bced
xor eax, eax
push edi
mov dword [ebp - 0x1426c], 7
mov dword [ebp - 0x14270], ebx
mov word [ebp - 0x14280], ax
call dword [sym.imp.MSVCR100.dll_wcslen]
add esp, 4
mov ecx, edi
lea esi, [ebp - 0x14280]
call fcn.0040885a
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0x14234], eax
mov dword [ebp - 0x14238], ebx
mov word [ebp - 0x14248], cx
xor edx, edx
mov dword [ebp - 0x14218], eax
mov dword [ebp - 0x1421c], ebx
mov word [ebp - 0x1422c], dx
mov dword [ebp - 0x14250], 0xf
mov dword [ebp - 0x14254], ebx
mov byte [ebp - 0x14264], bl
push 1
lea eax, [ebp - 0x142a0]
push eax
lea ecx, [ebp - 0x14280]
mov byte [ebp - 4], 4
mov esi, 0x3a
push ecx
mov dword [ebp - 0x142a0], esi
call fcn.0040d92d
cmp eax, 0xffffffff
je 0x42bd00
push 1
lea edx, [ebp - 0x142a0]
push edx
lea eax, [ebp - 0x14280]
push eax
mov dword [ebp - 0x142a0], esi
call fcn.0040d92d
push eax
push ebx
lea ecx, [ebp - 0x14280]
push ecx
lea eax, [ebp - 0x1429c]
call fcn.004089b5
mov esi, eax
mov edi, dword [sym.imp.MSVCR100.dll_memmove]
lea edx, [ebp - 0x14248]
cmp edx, esi
je 0x42ba1d
cmp dword [ebp - 0x14234], 8
jb 0x42b9c5
mov eax, dword [ebp - 0x14248]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x14234], 7
mov dword [ebp - 0x14238], ebx
mov word [ebp - 0x14248], cx
cmp dword [esi + 0x14], 8
jae 0x42b9fb
mov eax, dword [esi + 0x10]
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp - 0x14248]
push esi
push eax
call edi
add esp, 0xc
jmp 0x42ba05
mov ecx, dword [esi]
mov dword [ebp - 0x14248], ecx
mov dword [esi], ebx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x14238], edx
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x14234], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov byte [ebp - 4], 4
cmp dword [ebp - 0x14288], 8
jb 0x42ba3a
mov ecx, dword [ebp - 0x1429c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
push 1
lea edx, [ebp - 0x142a0]
push edx
lea eax, [ebp - 0x14280]
push eax
mov dword [ebp - 0x142a0], 0x3a
call fcn.0040d92d
push 0xffffffffffffffff
inc eax
push eax
lea ecx, [ebp - 0x14280]
push ecx
lea eax, [ebp - 0x1429c]
call fcn.004089b5
mov esi, eax
lea edx, [ebp - 0x1422c]
cmp edx, esi
je 0x42baec
cmp dword [ebp - 0x14218], 8
jb 0x42ba94
mov eax, dword [ebp - 0x1422c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x14218], 7
mov dword [ebp - 0x1421c], ebx
mov word [ebp - 0x1422c], cx
cmp dword [esi + 0x14], 8
jae 0x42baca
mov eax, dword [esi + 0x10]
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp - 0x1422c]
push esi
push eax
call edi
add esp, 0xc
jmp 0x42bad4
mov ecx, dword [esi]
mov dword [ebp - 0x1422c], ecx
mov dword [esi], ebx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x1421c], edx
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x14218], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov byte [ebp - 4], 4
cmp dword [ebp - 0x14288], 8
jb 0x42bb09
mov ecx, dword [ebp - 0x1429c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp dword [ebp - 0x14218], 8
mov eax, dword [ebp - 0x1422c]
jae 0x42bb1e
lea eax, [ebp - 0x1422c]
push eax
lea esi, [ebp - 0x1429c]
call fcn.0042a4d0
add esp, 4
mov esi, eax
lea edx, [ebp - 0x14264]
mov edi, 0x10
cmp edx, esi
je 0x42bbab
cmp dword [ebp - 0x14250], edi
jb 0x42bb56
mov eax, dword [ebp - 0x14264]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x14250], 0xf
mov dword [ebp - 0x14254], ebx
mov byte [ebp - 0x14264], bl
cmp dword [esi + 0x14], edi
jae 0x42bb89
mov eax, dword [esi + 0x10]
inc eax
push eax
lea ecx, [ebp - 0x14264]
push esi
push ecx
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x42bb93
mov edx, dword [esi]
mov dword [ebp - 0x14264], edx
mov dword [esi], ebx
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x14254], eax
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x14250], ecx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov byte [ebp - 4], 4
cmp dword [ebp - 0x14288], edi
jb 0x42bbc7
mov edx, dword [ebp - 0x1429c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [ebp - 0x14264]
cmp dword [ebp - 0x14250], edi
jae 0x42bbdb
lea eax, [ebp - 0x14264]
cmp dword [ebp - 0x14234], 8
mov esi, dword [ebp - 0x14248]
jae 0x42bbf0
lea esi, [ebp - 0x14248]
push ebx
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
mov edx, dword [ebp - 0x142a8]
add esp, 4
push eax
push esi
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov dword [ebp - 0x142b8], eax
cmp edi, ebx
jne 0x42bd41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x142a8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x14250], 0x10
jb 0x42bc46
mov ecx, dword [ebp - 0x14264]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 8
mov dword [ebp - 0x14250], 0xf
mov dword [ebp - 0x14254], ebx
mov byte [ebp - 0x14264], bl
cmp dword [ebp - 0x14218], edi
jb 0x42bc79
mov edx, dword [ebp - 0x1422c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov esi, 7
mov dword [ebp - 0x14218], esi
mov dword [ebp - 0x1421c], ebx
mov word [ebp - 0x1422c], ax
cmp dword [ebp - 0x14234], edi
jb 0x42bcab
mov ecx, dword [ebp - 0x14248]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov dword [ebp - 0x14234], esi
mov dword [ebp - 0x14238], ebx
mov word [ebp - 0x14248], dx
cmp dword [ebp - 0x1426c], edi
jb 0x42bcd8
mov eax, dword [ebp - 0x14280]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x1426c], esi
mov dword [ebp - 0x14270], ebx
mov word [ebp - 0x14280], cx
cmp dword [ebp + 0x1c], 0x10
jb 0x42c346
mov edx, dword [ebp + 8]
push edx
jmp 0x42c33d
mov eax, dword [ebp - 0x142ac]
push ebx
push str.http
call fcn.00424770
mov ecx, dword [ebp - 0x142a8]
movzx eax, al
add esp, 4
neg eax
sbb eax, eax
and eax, 0xfffffe95
add eax, 0x1bb
push eax
push edi
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov dword [ebp - 0x142b8], edi
jmp 0x42bc12
mov eax, dword [ebp - 0x142ac]
push str.http
call fcn.00424770
mov ecx, dword [ebp - 0x142a4]
add esp, 4
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xff800000
add eax, 0x800000
push eax
push ebx
push ebx
push ebx
push ecx
push 0x4e29f4
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x142ac], esi
cmp esi, ebx
jne 0x42be71
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call esi
mov edx, dword [ebp - 0x142a8]
push edx
call esi
cmp dword [ebp - 0x14250], 0x10
jb 0x42bdb7
mov eax, dword [ebp - 0x14264]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 8
mov byte [ebp - 0x14264], bl
mov dword [ebp - 0x14254], ebx
mov dword [ebp - 0x14250], 0xf
cmp dword [ebp - 0x14218], edi
jb 0x42bdea
mov ecx, dword [ebp - 0x1422c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov esi, 7
mov word [ebp - 0x1422c], dx
mov dword [ebp - 0x1421c], ebx
mov dword [ebp - 0x14218], esi
cmp dword [ebp - 0x14234], edi
jb 0x42be1c
mov eax, dword [ebp - 0x14248]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov word [ebp - 0x14248], cx
mov dword [ebp - 0x14238], ebx
mov dword [ebp - 0x14234], esi
cmp dword [ebp - 0x1426c], edi
jb 0x42be49
mov edx, dword [ebp - 0x14280]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x1426c], esi
mov dword [ebp - 0x14270], ebx
mov word [ebp - 0x14280], ax
jb 0x42c346
mov ecx, dword [ebp + 8]
push ecx
jmp 0x42c33d
push str.Content_Type:application_x_www_form_urlencoed_r_n
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x20000000
push eax
push str.Content_Type:application_x_www_form_urlencoed_r_n
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x42bea0
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
jmp 0x42bd92
lea edx, [ebp - 0x142bc]
push edx
lea eax, [ebp - 0x142b4]
push eax
push 0x1f
push esi
mov dword [ebp - 0x142bc], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
or dword [ebp - 0x142b4], 0x3100
push 4
lea ecx, [ebp - 0x142b4]
push ecx
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x142a0], eax
cmp eax, ebx
jne 0x42bf3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1fe
mov esi, eax
lea eax, [ebp - 0x20e]
xor edx, edx
push ebx
push eax
mov word [ebp - 0x210], dx
call sub.MSVCR100.dll_memset
push esi
lea ecx, [ebp - 0x210]
push str.Error:_d_n
push ecx
call dword [sym.imp.MSVCR100.dll_wprintf]
add esp, 0x18
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x42c16c
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x142a0], eax
cmp eax, ebx
je 0x42c166
push 0x13fff
lea eax, [ebp - 0x1420f]
push ebx
push eax
mov dword [ebp - 0x142b0], ebx
xor edi, edi
mov byte [ebp - 0x14210], bl
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [ebp + 8]
push ecx
lea esi, [ebp - 0x1429c]
call fcn.0040d306
cmp dword [ebp + 0x1c], 0x10
mov eax, dword [ebp + 8]
jae 0x42bf93
lea eax, [ebp + 8]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x42bfe0
push str.CreateFile_fail__r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14288], 0x10
jb 0x42c16c
mov edx, dword [ebp - 0x1429c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x42c16c
mov ecx, dword [ebp - 0x142ac]
lea eax, [ebp - 0x142b0]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x42bfbb
mov eax, dword [ebp - 0x142b0]
cmp eax, ebx
je 0x42c090
lea edx, [edi + eax]
cmp edx, 0x14000
jb 0x42c055
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x142a4]
push eax
push edi
lea ecx, [ebp - 0x14210]
push ecx
push esi
mov dword [ebp - 0x142a4], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor edi, edi
cmp dword [ebp - 0x142a4], ebx
je 0x42c0f6
cmp eax, ebx
je 0x42c0f6
mov eax, dword [ebp - 0x142b0]
mov ecx, dword [ebp - 0x142ac]
lea edx, [ebp - 0x142c0]
push edx
push eax
lea eax, [ebp + edi - 0x14210]
push eax
push ecx
mov dword [ebp - 0x142c0], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x42c11c
mov eax, dword [ebp - 0x142b0]
add edi, eax
cmp eax, ebx
ja 0x42bfe0
cmp edi, ebx
je 0x42c13d
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea edx, [ebp - 0x142a4]
push edx
push edi
lea eax, [ebp - 0x14210]
push eax
push esi
mov dword [ebp - 0x142a4], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x142a4], ebx
je 0x42c0cc
cmp eax, ebx
jne 0x42c13d
push str.WriteFile_faild2_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14288], 0x10
jb 0x42c16c
mov ecx, dword [ebp - 0x1429c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x42c16c
push str.WriteFile_faild_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14288], 0x10
jb 0x42c16c
mov eax, dword [ebp - 0x1429c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x42c16c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x14288], 0x10
jb 0x42c16c
mov ecx, dword [ebp - 0x1429c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x42c16c
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14288], 0x10
jb 0x42c16c
mov edx, dword [ebp - 0x1429c]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x42c16c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x142ac]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push eax
call esi
mov ecx, dword [ebp - 0x142b8]
push ecx
call esi
mov edx, dword [ebp - 0x142a8]
push edx
call esi
cmp dword [ebp - 0x142a0], ebx
je 0x42c273
cmp dword [ebp - 0x14250], 0x10
jb 0x42c1b2
mov eax, dword [ebp - 0x14264]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 8
mov dword [ebp - 0x14250], 0xf
mov dword [ebp - 0x14254], ebx
mov byte [ebp - 0x14264], bl
cmp dword [ebp - 0x14218], edi
jb 0x42c1e5
mov ecx, dword [ebp - 0x1422c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov esi, 7
mov dword [ebp - 0x14218], esi
mov dword [ebp - 0x1421c], ebx
mov word [ebp - 0x1422c], dx
cmp dword [ebp - 0x14234], edi
jb 0x42c217
mov eax, dword [ebp - 0x14248]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x14234], esi
mov dword [ebp - 0x14238], ebx
mov word [ebp - 0x14248], cx
cmp dword [ebp - 0x1426c], edi
jb 0x42c244
mov edx, dword [ebp - 0x14280]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x1426c], esi
mov dword [ebp - 0x14270], ebx
mov word [ebp - 0x14280], ax
jb 0x42c26c
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov al, 1
jmp 0x42c348
cmp dword [ebp - 0x14250], 0x10
jb 0x42c28c
mov edx, dword [ebp - 0x14264]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 8
mov dword [ebp - 0x14250], 0xf
mov dword [ebp - 0x14254], ebx
mov byte [ebp - 0x14264], bl
cmp dword [ebp - 0x14218], edi
jb 0x42c2bf
mov eax, dword [ebp - 0x1422c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov esi, 7
mov dword [ebp - 0x14218], esi
mov dword [ebp - 0x1421c], ebx
mov word [ebp - 0x1422c], cx
cmp dword [ebp - 0x14234], edi
jb 0x42c2f1
mov edx, dword [ebp - 0x14248]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [ebp - 0x14234], esi
mov dword [ebp - 0x14238], ebx
mov word [ebp - 0x14248], ax
cmp dword [ebp - 0x1426c], edi
jb 0x42c31e
mov ecx, dword [ebp - 0x14280]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x1426c], esi
mov dword [ebp - 0x14270], ebx
mov word [ebp - 0x14280], dx
jb 0x42c346
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
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 - 0x10]
xor ecx, ebp
call fcn.00485d44
mov esp, ebp
pop ebp
ret