Function at 0x4d8500
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Send data
Send http request
Set http header

Disassembly:
push ebp
lea ebp, [esp - 0x1204]
mov eax, 0x1204
call fcn.004e03c0
push 0xffffffffffffffff
push 0x4f954c
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x53fa2c]
xor eax, ebp
mov dword [ebp + 0x1200], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x120c]
mov dword [ebp - 0x28], eax
mov esi, dword [ebp + 0x1210]
mov dword [ebp - 0x3c], esi
mov ecx, dword [ebp + 0x1218]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ecx]
push ecx
mov edi, dword [ebp + 0x1214]
push edi
mov edx, dword [esi]
push edx
mov eax, dword [eax]
push eax
push str.UploadFileToServer_start__s_____s:_d__s_
push 8
call fcn.0043d500
add esp, 0x18
push 0
push 0
push 0
push 0
push str.A_WinHTTP_Example_Program_1.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
test ebx, ebx
jne 0x4d85b1
push str.WinHTTP_session_
push 8
call fcn.0043d500
add esp, 8
jmp 0x4d86f1
mov eax, dword [esi]
push eax
lea ecx, [ebp - 0x168]
call fcn.0041e9f0
mov byte [ebp - 4], 1
mov eax, dword [eax]
push 0
push edi
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x168]
call fcn.0041cfc0
test edi, edi
jne 0x4d8603
mov ecx, dword [esi]
push ecx
push str.WinHTTP
push 8
call fcn.0043d500
add esp, 0xc
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x4d86f1
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x168]
call fcn.0041e9f0
mov byte [ebp - 4], 2
mov eax, dword [eax]
push pe_nt_image_headers32
push 0
push 0
push 0
push eax
push str.POST
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x168]
call fcn.0041cfc0
test esi, esi
jne 0x4d866d
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax]
push ecx
push str.HTTP
push 8
call fcn.0043d500
add esp, 0xc
push edi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push ebx
call esi
jmp 0x4d86f1
mov byte [ebp + 0x1000], 0
push 0x1ff
push 0
lea edx, [ebp + 0x1001]
push edx
call sub.MSVCR90.dll_memset
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
lea ecx, [ebp + 0x1000]
push ecx
push eax
call fcn.0044a8c0
add esp, 0x14
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_404
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x28]
mov eax, dword [edx]
push 0
push 0x8000
push eax
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_5520
test eax, eax
jne 0x4d8716
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push ecx
push 0x521618
push 8
call fcn.0043d500
add esp, 0xc
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push edi
call esi
push ebx
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_663
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1200]
xor ecx, ebp
call fcn.004e0148
add ebp, 0x1204
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_3179
mov dword [ebp - 0x60], eax
push str.MyBoundary
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90.dll_Ordinal_310]
mov byte [ebp - 4], 4
lea edx, [ebp - 0x14]
push edx
push str.Content_Type:_multipart_form_data__boundary
lea eax, [ebp - 0x20]
push eax
call fcn.00410070
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x14]
push ecx
push 0x5215d8
lea edx, [ebp - 0x48]
push edx
call fcn.00410070
mov byte [ebp - 4], 6
push 0x504bd4
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00402a60
mov byte [ebp - 4], 7
push str.Content_Disposition:_form_data__name_file___filename_
push eax
lea ecx, [ebp - 0x5c]
push ecx
call fcn.00402a60
mov byte [ebp - 4], 8
lea edx, [ebp + 0x1000]
push edx
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.00402a60
mov byte [ebp - 4], 9
push 0x52159c
push eax
lea ecx, [ebp - 0x54]
push ecx
call fcn.00402a60
add esp, 0x48
mov byte [ebp - 4], 0xa
push str.Content_Type:_application_octet_stream_r_n_r_n
push eax
lea edx, [ebp - 0x1c]
push edx
call fcn.00402a60
add esp, 0xc
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x54]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x64]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x5c]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x58]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x48]
call dword [sym.imp.mfc90.dll_Ordinal_601]
lea eax, [ebp - 0x14]
push eax
push str._r_n__
lea ecx, [ebp - 0x48]
push ecx
call fcn.00410070
mov byte [ebp - 4], 0x11
push str.___r_n
push eax
lea edx, [ebp - 0x18]
push edx
call fcn.00402a60
add esp, 0x18
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x48]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp - 0x168]
call fcn.0041e9f0
mov byte [ebp - 4], 0x14
mov eax, dword [eax]
push 0x20000000
push 0xffffffffffffffff
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
sete byte [ebp - 0x21]
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x168]
call fcn.0041cfc0
cmp byte [ebp - 0x21], 0
je 0x4d88d6
push 0x52153c
push 8
call fcn.0043d500
add esp, 8
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_1555
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push edi
call esi
push ebx
call esi
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90.dll_Ordinal_601]
jmp 0x4d86e5
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx - 0xc]
mov edx, dword [ebp - 0x18]
mov ecx, dword [edx - 0xc]
add eax, ecx
add eax, dword [ebp - 0x60]
push 0
push eax
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x4d8907
push 0x52151c
jmp 0x4d887c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax - 0xc]
lea edx, [ebp - 0x4c]
push edx
push ecx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x4d8930
push 0x5214f4
jmp 0x4d887c
push 0x1000
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_5753
test eax, eax
jbe 0x4d8963
lea ecx, [ebp - 0x4c]
push ecx
push eax
lea edx, [ebp]
push edx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x4d8930
push 0x5214cc
jmp 0x4d887c
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax - 0xc]
lea edx, [ebp - 0x4c]
push edx
push ecx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x4d8984
push 0x5214a4
jmp 0x4d887c
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x4d899b
push 0x521484
jmp 0x4d887c
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x40], 4
push 0
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x50]
push ecx
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov eax, dword [ebp - 0x50]
cmp eax, 0xc8
je 0x4d89e7
push eax
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx]
push edx
push 0x521454
push 8
call fcn.0043d500
add esp, 0x14
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_1555
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push edi
call esi
push ebx
call esi
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call sub.mfc90.dll_Ordinal_663
mov dword [ebp - 4], 0xffffffff
jmp 0x4d86f1