Function at 0x405f90
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Resolve function by parsing pe exports
Send data
Send http request
Set http header

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x412aa8
push eax
mov dword fs:[0], esp
sub esp, 0xca4
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x405fc7
mov dword [ebp + 0xc4], 3
jmp 0x4065e3
mov al, byte [esp + 0x27]
push 0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov esi, dword [esp + 0xcc4]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
lea ecx, [esp + 0x3c]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x406020
mov edi, dword [esp + 0x3c]
mov ecx, ebx
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
lea eax, [esp + 0x38]
lea ecx, [esp + 0x10]
xor ebx, ebx
push eax
push ecx
mov dword [esp + 0xcc4], ebx
call fcn.0040b7a0
add esp, 8
push 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0xcc0], 2
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Freeze_void_]
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Freeze_void_]
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x406076
mov edx, dword [esp + 0x18]
lea ebx, [eax + edx*2]
lea ecx, [esp + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Freeze_void_]
mov esi, dword [esp + 0x14]
cmp esi, ebx
je 0x4060a4
xor eax, eax
mov ax, word [esi]
push eax
call dword [sym.imp.MSVCRT.dll_toupper]
mov word [edi], ax
add esi, 2
add esp, 4
add edi, 2
cmp esi, ebx
jne 0x406088
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push 0x41d608
call ebx
mov ecx, dword [esp + 0x1c]
add esp, 4
push eax
push 0x41d608
push ecx
push 0
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_public:_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::compare_unsigned_int__unsigned_int__unsigned_short_int_const___unsigned_int_const]
test eax, eax
jne 0x406110
push 0x41d608
call ebx
add esp, 4
mov esi, eax
lea ecx, [esp + 0x10]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x406177
mov edx, dword [esp + 0x14]
push esi
push 0x41d608
push edx
call fcn.00407840
add esp, 0xc
lea ecx, [esp + 0x10]
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
jmp 0x406177
push 0x41d5fc
call ebx
add esp, 4
lea ecx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
push 0x41d5fc
push eax
push 0
call dword [sym.imp.MSVCP60.dll_public:_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::compare_unsigned_int__unsigned_int__unsigned_short_int_const___unsigned_int_const]
test eax, eax
jne 0x4065c2
push 0x41d5fc
call ebx
add esp, 4
mov esi, eax
lea ecx, [esp + 0x10]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x406177
mov ecx, dword [esp + 0x14]
push esi
push 0x41d5fc
push ecx
call fcn.00407840
mov edx, dword [esp + 0x20]
mov dword [esp + 0x24], esi
add esp, 0xc
mov word [edx + esi*2], 0
mov eax, dword [ebp + 4]
mov dword [esp + 0x2c], 1
test eax, eax
jne 0x4061bc
mov eax, dword [ebp + 0xdc]
test eax, eax
jne 0x406195
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
test eax, eax
mov dword [ebp + 4], eax
jne 0x4061bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc4], eax
jmp 0x4065cc
mov eax, dword [ebp + 0x128]
mov ecx, dword [ebp + 0x124]
mov edx, dword [ebp + 0x120]
push eax
mov eax, dword [ebp + 0x11c]
push ecx
mov ecx, dword [ebp + 4]
push edx
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x86]
mov word [esp + 0x84], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x289
xor eax, eax
lea edi, [esp + 0x28e]
mov word [esp + 0x28c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x4c]
mov dword [esp + 0x48], 0x3c
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x1c]
lea eax, [esp + 0x28c]
mov dword [esp + 0x74], eax
mov eax, dword [ebp + 0x18]
lea edx, [esp + 0x84]
mov dword [esp + 0x5c], 0x104
test eax, eax
mov dword [esp + 0x58], edx
mov dword [esp + 0x78], 0x514
mov dword [esp + 0x50], 1
jne 0x40626c
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
lea edx, [esp + 0x48]
push edx
push 0
push ecx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x4062a8
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4065e3
mov al, byte [ecx - 1]
test al, al
je 0x40633e
cmp al, 0xff
je 0x40633e
dec al
mov byte [ecx - 1], al
jmp 0x4065e3
lea eax, [esp + 0x84]
lea edi, [ebp + 0x24]
push eax
call ebx
add esp, 4
mov esi, eax
mov ecx, edi
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x4062fa
mov eax, dword [edi + 4]
lea ecx, [esp + 0x84]
test esi, esi
jbe 0x4062ee
mov edx, esi
mov bx, word [ecx]
add ecx, 2
mov word [eax], bx
add eax, 2
dec edx
jne 0x4062d9
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
mov ecx, dword [edi + 4]
mov dword [edi + 8], esi
mov word [ecx + esi*2], 0
mov edx, dword [esp + 0x60]
mov ecx, dword [ebp + 4]
push 0
lea eax, [esp + 0x88]
push edx
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, eax
test edx, edx
mov dword [esp + 0x30], edx
jne 0x40634f
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4065e3
mov al, byte [ecx - 1]
test al, al
je 0x40633e
cmp al, 0xff
je 0x40633e
dec al
mov byte [ecx - 1], al
jmp 0x4065e3
add ecx, 0xfffffffe
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4065e3
mov eax, dword [esp + 0x54]
mov edi, 2
xor ecx, ecx
cmp eax, edi
mov eax, dword [esp + 0x14]
setne cl
dec ecx
and ecx, 0x800000
test eax, eax
jne 0x406373
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push ecx
mov ecx, dword [esp + 0x78]
push 0
push 0
push 0
push ecx
push eax
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x406587
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x4063b6
cmp dword [esp + 0x54], edi
jne 0x4063b6
lea edx, [esp + 0x20]
push 4
push edx
push 0x1f
push esi
mov dword [esp + 0x30], 0x3100
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov dword [esp + 0x20], 0
jmp 0x4063c6
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
mov eax, dword [esp + 0x20]
mov ecx, eax
inc eax
cmp ecx, 1
mov dword [esp + 0x20], eax
jae 0x406578
mov ecx, dword [ebp + 0xac]
test ecx, ecx
je 0x406411
mov eax, dword [ebp + 0xa8]
test eax, eax
jne 0x4063f3
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 0x1000000
push ecx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x406411
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc4], eax
push esi
mov ecx, ebp
call fcn.00406ec0
push esi
mov ecx, ebp
call fcn.004069b0
mov edx, dword [esp + 0xcc8]
mov ecx, ebp
push edx
push esi
call fcn.00407010
push 0x41d5fc
call ebx
mov ebx, dword [esp + 0x1c]
add esp, 4
cmp ebx, eax
mov edi, ebx
jb 0x406447
mov edi, eax
mov ecx, dword [esp + 0x14]
mov edx, 0x41d5fc
test edi, edi
jbe 0x40647b
mov bx, word [ecx]
cmp bx, word [edx]
jne 0x406467
add ecx, 2
add edx, 2
dec edi
jne 0x406454
jmp 0x406477
mov cx, word [ecx]
cmp cx, word [edx]
sbb ecx, ecx
and ecx, 0xfffffffe
inc ecx
test ecx, ecx
jne 0x4064b7
mov ebx, dword [esp + 0x18]
cmp ebx, eax
jb 0x4064b7
xor ecx, ecx
cmp ebx, eax
setne cl
test ecx, ecx
jne 0x4064b7
mov eax, dword [esp + 0xccc]
mov edx, dword [esp + 0xcd0]
test eax, eax
setne cl
mov dword [ebp + 0x98], ecx
push esi
mov ecx, ebp
mov dword [ebp + 0x9c], eax
mov dword [ebp + 0xa0], edx
call fcn.00406d50
push 0
push 0
push 0
push 0
push 0
push 0
push esi
mov dword [esp + 0x44], 0
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
mov dword [esp + 0x28], eax
jne 0x4064ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x28]
mov ecx, ebp
push edx
push esi
mov dword [ebp + 0xc4], eax
call fcn.004067a0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4063c0
mov eax, dword [ebp + 0x9c]
test eax, eax
je 0x406535
mov edx, dword [ebp + 0xa0]
lea ecx, [esp + 0x34]
push ecx
push edx
push eax
push esi
mov dword [esp + 0x44], 0
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x406535
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc4], eax
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x406553
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc4], eax
jmp 0x4063c0
push esi
mov ecx, ebp
call fcn.00407050
push esi
mov ecx, ebp
call fcn.00407430
push esi
mov ecx, ebp
call fcn.00407590
test eax, eax
je 0x406578
mov ecx, ebp
call fcn.00406600
jmp 0x406580
mov dword [esp + 0x2c], 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4065bc
mov al, byte [ecx - 1]
test al, al
je 0x4065b0
cmp al, 0xff
je 0x4065b0
dec al
mov byte [ecx - 1], al
mov eax, dword [esp + 0x2c]
jmp 0x4065e5
add ecx, 0xfffffffe
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x2c]
jmp 0x4065e5
mov dword [ebp + 0xc4], 0x57
push 1
lea ecx, [esp + 0x14]
mov dword [esp + 0xcc0], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
xor eax, eax
mov ecx, dword [esp + 0xcb4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xcb0
ret 0x10