Function at 0x403a90
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x40fd46
push eax
mov eax, 0x2ab8
mov dword fs:[0], esp
call fcn.0040f7b0
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [ebp + 0x3ec]
call fcn.00403180
lea ecx, [ebp + 0x418]
call fcn.00403180
lea ecx, [ebp + 0x444]
call fcn.00403180
lea ecx, [ebp + 0x4c8]
call fcn.00403180
lea ecx, [ebp + 0x4f4]
call fcn.00403180
lea edi, [ebp + 0x520]
mov ecx, edi
mov dword [esp + 0x18], edi
call fcn.00403180
mov eax, dword [ebp + 0x3a8]
sub eax, 0
je 0x403b42
dec eax
je 0x403b31
dec eax
push 0
push 0
je 0x403b1f
push 0
lea eax, [ebp + 0x224]
push 1
push eax
jmp 0x403b51
lea ecx, [ebp + 0x1a4]
lea edx, [ebp + 0x224]
push ecx
push 3
push edx
jmp 0x403b51
push 0
push 0
push 0
lea eax, [ebp + 0x224]
push 0
push eax
jmp 0x403b51
push 0
push 0
push 0
lea ecx, [ebp + 0x224]
push 1
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [ebp + 0x578], eax
jne 0x403b83
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._InternetOpen__Errorid_d_n
push edi
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
xor eax, eax
jmp 0x4043c2
mov ecx, dword [ebp + 0x3c0]
mov ebx, dword [sym.imp.WININET.dll_InternetSetOptionA]
test ecx, ecx
je 0x403bd9
lea esi, [ebp + 0x3bc]
push 4
push esi
push 2
push eax
call ebx
mov edx, dword [ebp + 0x578]
push 4
push esi
push 5
push edx
call ebx
mov eax, dword [ebp + 0x578]
push 4
push esi
push 6
push eax
call ebx
mov ecx, dword [ebp + 0x578]
push 4
push esi
push 7
push ecx
call ebx
mov edx, dword [ebp + 0x578]
push 4
push esi
push 8
push edx
call ebx
mov ax, word [ebp + 0x3a4]
mov edx, dword [ebp + 0x578]
push 0
push 0
push 3
push 0
push 0
lea ecx, [ebp + 4]
push eax
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edx, eax
test edx, edx
mov dword [ebp + 0x57c], edx
jne 0x403c2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._InternetConnect__Errorid_d_n
push edi
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
xor eax, eax
jmp 0x4043c2
mov eax, dword [str.HTTP_1.1]
mov ecx, dword [0x4138a4]
mov dword [esp + 0x38], eax
mov al, byte [0x4138a8]
mov byte [esp + 0x40], al
xor eax, eax
mov dword [esp + 0x29], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2d], eax
xor ecx, ecx
mov dword [esp + 0x31], eax
mov dword [esp + 0x41], ecx
mov word [esp + 0x35], ax
mov word [esp + 0x45], cx
mov byte [esp + 0x37], al
mov eax, dword [ebp + 0x3e8]
sub eax, ecx
mov byte [esp + 0x47], cl
mov byte [esp + 0x28], cl
je 0x403cc4
dec eax
je 0x403ca2
dec eax
jne 0x403cf4
mov edi, str.OPTIONS
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
mov eax, ecx
jmp 0x403ce4
mov edi, str.POST
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
mov eax, ecx
jmp 0x403ce4
mov edi, 0x41388c
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x18]
mov eax, dword [ebp + 0x3c4]
dec eax
mov eax, dword [ebp + 0x3cc]
je 0x403d18
neg eax
sbb eax, eax
and eax, 0xffe00000
add eax, 0x200000
or eax, 0x800c8200
jmp 0x403d2b
neg eax
sbb eax, eax
and eax, 0xffe00000
add eax, 0x200000
or eax, 0x808c0200
push 0
lea ecx, [ebp + 0xa4]
push eax
push 0
lea eax, [esp + 0x44]
push ecx
push eax
push ecx
lea ecx, [esp + 0x40]
push ecx
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
test eax, eax
mov dword [ebp + 0x580], eax
jne 0x403d75
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._HttpOpenRequest__Errorid_d_n
push edi
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
xor eax, eax
jmp 0x4043c2
mov ecx, dword [ebp + 0x3d0]
test ecx, ecx
je 0x403dc7
lea edx, [ebp + 0x1e4]
push 0x20
push edx
push 0x2b
push eax
call ebx
mov ecx, dword [ebp + 0x580]
lea eax, [ebp + 0x204]
push 0x20
push eax
push 0x2c
push ecx
call ebx
test eax, eax
jne 0x403dc7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._InternetSetOption__Errorid_d_n
push edi
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
xor eax, eax
jmp 0x4043c2
mov ecx, ebp
call fcn.00403630
lea esi, [ebp + 0x49c]
lea edi, [ebp + 0x470]
mov ecx, esi
call fcn.00403090
push eax
push 0
mov ecx, esi
call fcn.004031c0
push eax
mov ecx, edi
call fcn.00403090
push eax
push 0
mov ecx, edi
call fcn.004031c0
mov edx, dword [ebp + 0x580]
push eax
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x403ec1
mov eax, dword [ebp + 0x3c4]
test eax, eax
je 0x403ec1
mov edx, dword [ebp + 0x580]
lea eax, [esp + 0x20]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x1f
push edx
mov dword [esp + 0x30], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
test eax, eax
je 0x403e66
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x10]
or ecx, 0x3180
push 4
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 0x580]
push eax
push 0x1f
push ecx
call ebx
mov ecx, esi
call fcn.00403090
push eax
push 0
mov ecx, esi
call fcn.004031c0
push eax
mov ecx, edi
call fcn.00403090
push eax
push 0
mov ecx, edi
call fcn.004031c0
mov edx, dword [ebp + 0x580]
push eax
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x403ec1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3b4], eax
push eax
mov eax, dword [esp + 0x1c]
push str._HttpSendRequest__Errorid_d_n
push eax
call fcn.00402f00
add esp, 0xc
xor eax, eax
jmp 0x4043c2
mov ecx, dword [ebp + 0x3c8]
mov eax, dword [ebp + 0x3c4]
test eax, ecx
je 0x403f7c
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x1ac9]
mov byte [esp + 0x1ac8], 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x580]
lea edx, [esp + 0x20]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x1ac8]
push edx
push eax
push 0x20
push ecx
mov dword [esp + 0x30], 0x1000
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
mov edx, dword [esp + 0x1ad8]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x403f7c
push edx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
push 0x413690
push 0x41360c
lea ecx, [esp + 0x18]
mov dword [esp + 0x2ad8], 0
call sub.MFC42.DLL_CString::Replace
push 0
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::GetBuffer
push eax
lea ecx, [ebp + 0x54c]
call fcn.00402fd0
lea ecx, [esp + 0x10]
mov dword [esp + 0x2ad0], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x49]
mov byte [esp + 0x48], 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x580]
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoA]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x14]
push 0
lea eax, [esp + 0x4c]
push edx
push eax
mov esi, 0x80
push 0x13
push ecx
mov dword [esp + 0x38], 0
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x403fe9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x18]
push eax
push str._HttpQueryInfo_HTTP_QUERY_STATUS_CODE__Errorid_d_n
push edx
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
xor eax, eax
jmp 0x4043c2
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov ecx, dword [ebp + 0x3cc]
add esp, 4
test ecx, ecx
mov dword [ebp + 0x3b8], eax
jne 0x404067
cmp eax, 0x12e
je 0x404015
cmp eax, 0x12d
jne 0x404067
mov eax, dword [ebp + 0x580]
lea ecx, [esp + 0x14]
push 0
lea edx, [esp + 0x4c]
push ecx
push edx
push 0x21
push eax
mov dword [esp + 0x28], esi
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x404055
call esi
mov ecx, dword [esp + 0x18]
push eax
push str._HttpQueryInfo_HTTP_QUERY_LOCATION__Errorid_d_n
push ecx
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
lea edx, [esp + 0x48]
lea ecx, [ebp + 0x418]
push edx
call fcn.00402fd0
jmp 0x40406d
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xc9]
mov byte [esp + 0xc8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [ebp + 0x580]
push 0
stosb byte es:[edi], al
lea eax, [esp + 0x18]
lea ecx, [esp + 0xcc]
push eax
push ecx
push 0x25
push edx
mov dword [esp + 0x28], 0x80
call ebx
test eax, eax
jne 0x4040c9
call esi
mov dword [ebp + 0x3b4], eax
push eax
mov eax, dword [esp + 0x1c]
push str._HttpQueryInfo_HTTP_QUERY_SERVER__Errorid_d_n
push eax
call fcn.00402f00
add esp, 0xc
lea ecx, [esp + 0xc8]
push ecx
lea ecx, [ebp + 0x3ec]
call fcn.00402fd0
cmp dword [ebp + 0x3d4], 1
jne 0x404154
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1c9]
mov byte [esp + 0x1c8], 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x580]
lea edx, [esp + 0x14]
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0
lea eax, [esp + 0x1cc]
push edx
push eax
push 7
push ecx
mov dword [esp + 0x28], 0x80
call ebx
test eax, eax
jne 0x404141
call esi
mov edx, dword [esp + 0x18]
push eax
push str._HttpQueryInfo_HTTP_QUERY_ALLOW__Errorid_d_n
push edx
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
lea eax, [esp + 0x1c8]
lea ecx, [ebp + 0x444]
push eax
call fcn.00402fd0
cmp dword [ebp + 0x3d8], 1
jne 0x4041cc
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x2c9]
mov byte [esp + 0x2c8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x14]
push 0
lea edx, [esp + 0x2cc]
push ecx
stosb byte es:[edi], al
mov eax, dword [ebp + 0x580]
push edx
push 0x16
push eax
mov dword [esp + 0x28], 0x400
call ebx
test eax, eax
jne 0x4041b9
call esi
mov ecx, dword [esp + 0x18]
push eax
push str._HttpQueryInfo_HTTP_QUERY_RAW_HEADERS_CRLF__Errorid_d_n
push ecx
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
lea edx, [esp + 0x2c8]
lea ecx, [ebp + 0x4f4]
push edx
call fcn.00402fd0
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x6c9]
mov byte [esp + 0x6c8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [ebp + 0x580]
push 0
stosb byte es:[edi], al
lea eax, [esp + 0x18]
lea ecx, [esp + 0x6cc]
push eax
push ecx
push 0x2f
push edx
mov dword [esp + 0x28], 0x400
call ebx
test eax, eax
jne 0x40422d
call esi
mov dword [ebp + 0x3b4], eax
push eax
mov eax, dword [esp + 0x1c]
push str._HttpQueryInfo_HTTP_QUERY_RAW_HEADERS_CRLF__Errorid_d_n
push eax
call fcn.00402f00
add esp, 0xc
jmp 0x4042c6
lea ecx, [esp + 0x6c8]
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
push 0x416610
push str.attachment__filename
lea ecx, [esp + 0x24]
mov dword [esp + 0x2ad8], 1
call sub.MFC42.DLL_CString::Replace
push 0x416610
push 0x413714
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::Replace
mov edx, dword [esp + 0x1c]
cmp dword [edx - 8], 0x80
jge 0x4042b2
push 0
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::GetBuffer
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0x324]
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 esi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2ad0], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x48]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x580]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x4c]
push ecx
push edx
push 5
push eax
mov dword [esp + 0x28], 0x80
call ebx
test eax, eax
je 0x40430b
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp + 0x3b0], eax
jmp 0x404326
call esi
mov edx, dword [esp + 0x18]
push eax
push str._HttpQueryInfo_HTTP_QUERY_CONTENT_LENGTH__Errorid_d_n
push edx
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0xac9]
mov byte [esp + 0xac8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ebx, [ebp + 0x4c8]
mov ecx, ebx
stosb byte es:[edi], al
call fcn.00403180
mov eax, dword [ebp + 0x3dc]
test eax, eax
je 0x4043bd
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
mov edx, dword [ebp + 0x580]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0xac8]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
lea ecx, [esp + 0xac8]
push eax
push 0x1000
push ecx
push edx
call esi
test eax, eax
je 0x4043db
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4043bd
mov edi, dword [ebp + 0x3ac]
push eax
add edi, eax
lea eax, [esp + 0xacc]
push eax
mov ecx, ebx
mov dword [ebp + 0x3ac], edi
call fcn.00403000
mov eax, dword [ebp + 0x3dc]
test eax, eax
jne 0x40435e
mov eax, 1
mov ecx, dword [esp + 0x2ac8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2ac4
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x18]
push eax
push str._InternetReadFile__Errorid_d_n
push ecx
mov dword [ebp + 0x3b4], eax
call fcn.00402f00
add esp, 0xc
xor eax, eax
jmp 0x4043c2