Function at 0x406410
Capabilities:
Create http request

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x86c
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.Phoenix_Patcher
call dword [sym.imp.WININET.DLL_InternetOpenA]
mov dword [ebp - 0x850], eax
sub esp, 0x14
test eax, eax
je 0x4067d0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x850]
mov dword [esp], eax
call sym.attempt_url_connection_void__char_
mov dword [ebp - 0x840], eax
test eax, eax
je 0x406610
mov dword [ebp - 0x834], 0
lea eax, [ebp - 0x830]
mov dword [ebp - 0x830], 0x20
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x818]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 5
mov eax, dword [ebp - 0x840]
mov dword [esp], eax
call dword [sym.imp.WININET.DLL_HttpQueryInfoA]
sub esp, 0x14
mov ebx, eax
test eax, eax
je 0x406830
lea eax, [ebp - 0x818]
mov dword [esp], eax
call sym._atoi
mov ebx, eax
lea eax, [ebp - 0x828]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x82c], 0
mov dword [ebp - 0x830], eax
lea eax, [ebp - 0x834]
mov dword [ebp - 0x844], eax
mov eax, dword [sym.imp.WININET.DLL_InternetReadFile]
test edx, edx
mov byte [ebp - 0x828], 0
mov dword [ebp - 0x848], eax
je 0x406565
jmp 0x4068f5
add eax, edi
cmp esi, 1
je 0x406740
lea ecx, [ebp - 0x818]
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x830]
mov dword [ebp - 0x83c], eax
mov eax, dword [ebp - 0x83c]
mov dword [ebp - 0x82c], ebx
mov byte [eax + ebx], 0
mov eax, dword [ebp - 0x844]
mov dword [esp + 8], 0x800
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x818]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x840]
mov dword [esp], eax
mov eax, dword [ebp - 0x848]
call eax
sub esp, 0x10
test eax, eax
je 0x406760
mov esi, dword [ebp - 0x834]
test esi, esi
je 0x406760
mov edi, dword [ebp - 0x82c]
mov eax, 0x7fffffff
sub eax, edi
cmp eax, esi
jb 0x406b2c
mov eax, dword [ebp - 0x830]
lea ecx, [ebp - 0x828]
lea ebx, [edi + esi]
cmp eax, ecx
je 0x406708
mov edx, dword [ebp - 0x828]
cmp edx, ebx
jae 0x406528
test ebx, ebx
js 0x406b38
mov eax, edx
add eax, eax
mov dword [ebp - 0x84c], eax
cmp ebx, eax
jae 0x406648
test eax, eax
jns 0x406a6f
call method.std.__throw_bad_alloc__
lea esi, [esi]
nop
mov eax, dword [ebp - 0x850]
mov dword [esp], eax
call dword [sym.imp.WININET.DLL_InternetCloseHandle]
sub esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
add eax, 8
mov dword [ecx + 4], 0
mov dword [ecx], eax
mov eax, ecx
mov byte [ecx + 8], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebx
add eax, 1
js 0x406603
mov dword [ebp - 0x84c], ebx
mov dword [esp], eax
call sym.operator_new_unsigned_int_
mov dword [ebp - 0x83c], eax
mov ecx, dword [ebp - 0x830]
test edi, edi
je 0x406692
cmp edi, 1
je 0x406800
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [ebp - 0x854], ecx
mov dword [esp], eax
call sym._memcpy
mov ecx, dword [ebp - 0x854]
mov eax, dword [ebp - 0x83c]
add edi, eax
cmp esi, 1
je 0x4067f0
lea eax, [ebp - 0x818]
mov dword [ebp - 0x854], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._memcpy
mov ecx, dword [ebp - 0x854]
lea eax, [ebp - 0x828]
cmp ecx, eax
je 0x4066e4
mov eax, dword [ebp - 0x828]
mov dword [esp], ecx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov eax, dword [ebp - 0x83c]
mov dword [ebp - 0x830], eax
mov eax, dword [ebp - 0x84c]
mov dword [ebp - 0x828], eax
jmp 0x406555
cmp ebx, 0xf
jbe 0x406528
test ebx, ebx
js 0x406b38
cmp ebx, 0x1d
ja 0x406648
mov dword [ebp - 0x84c], 0x1e
mov eax, 0x1f
jmp 0x406655
movzx edx, byte [ebp - 0x818]
mov byte [eax], dl
mov eax, dword [ebp - 0x830]
mov dword [ebp - 0x83c], eax
jmp 0x406555
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
jne 0x406810
mov eax, dword [ebp - 0x840]
mov ebx, dword [sym.imp.WININET.DLL_InternetCloseHandle]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x850]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp + 8]
lea edi, [ebp - 0x828]
mov ecx, dword [ebp - 0x82c]
sub esp, 4
lea edx, [eax + 8]
mov dword [eax], edx
mov eax, dword [ebp - 0x830]
cmp eax, edi
je 0x406850
mov edi, dword [ebp + 8]
mov dword [edi], eax
mov eax, dword [ebp - 0x828]
mov dword [edi + 8], eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.FileContents_Error__d
mov dword [esp + 4], eax
call sym.Log_char_const__..._
jmp 0x406622
movzx eax, byte [ebp - 0x818]
mov byte [edi], al
jmp 0x4066c5
mov edx, eax
movzx eax, byte [ecx]
mov byte [edx], al
jmp 0x406692
call ebx
mov dword [esp + 4], eax
mov dword [esp], str.FileContents_Read_Error__d
call sym.Log_char_const__..._
jmp 0x406770
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.Query_Info_Error__d
mov dword [esp + 4], eax
call sym.Log_char_const__..._
jmp 0x4064e1
lea ebx, [ecx + 1]
cmp ebx, 4
jb 0x406a77
mov eax, dword [ebp - 0x828]
mov edi, dword [ebp + 8]
lea esi, [ebp - 0x828]
mov dword [edi + 8], eax
mov eax, dword [ebp + ebx - 0x82c]
mov dword [edx + ebx - 4], eax
mov eax, dword [ebp + 8]
add eax, 0xc
and eax, 0xfffffffc
sub edx, eax
add ebx, edx
sub esi, edx
and ebx, 0xfffffffc
cmp ebx, 4
jb 0x4067c2
and ebx, 0xfffffffc
xor edx, edx
mov edi, dword [esi + edx]
mov dword [eax + edx], edi
add edx, 4
cmp edx, ebx
jb 0x406899
jmp 0x4067c2
add eax, edi
cmp esi, 1
je 0x406b00
lea ecx, [ebp - 0x818]
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._memcpy
mov edx, dword [ebp - 0x830]
mov eax, dword [ebp - 0x83c]
mov dword [ebp - 0x82c], eax
mov byte [edx + eax], 0
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp + 0x10]
mov eax, dword [ebp - 0x844]
mov dword [esp + 8], 0x800
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x818]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x840]
mov dword [esp], eax
mov eax, dword [ebp - 0x848]
call eax
sub esp, 0x10
test eax, eax
je 0x406760
mov esi, dword [ebp - 0x834]
test esi, esi
je 0x406760
mov edi, dword [ebp - 0x82c]
mov eax, 0x7fffffff
sub eax, edi
cmp eax, esi
jb 0x406b2c
lea eax, [esi + edi]
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x83c], eax
mov eax, dword [ebp - 0x830]
cmp eax, ecx
je 0x406ad0
mov edx, dword [ebp - 0x828]
mov ecx, dword [ebp - 0x83c]
cmp edx, ecx
jae 0x4068b0
mov eax, dword [ebp - 0x83c]
test eax, eax
js 0x406b38
lea eax, [edx + edx]
mov dword [ebp - 0x84c], eax
cmp dword [ebp - 0x83c], eax
jae 0x406ab0
test eax, eax
js 0x406603
add eax, 1
mov dword [esp], eax
call sym.operator_new_unsigned_int_
mov ecx, dword [ebp - 0x830]
mov edx, eax
test edi, edi
je 0x4069f4
cmp edi, 1
je 0x406b22
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [ebp - 0x858], ecx
mov dword [esp], eax
mov dword [ebp - 0x854], eax
call sym._memcpy
mov ecx, dword [ebp - 0x858]
mov edx, dword [ebp - 0x854]
add edi, edx
cmp esi, 1
je 0x406b14
lea eax, [ebp - 0x818]
mov dword [ebp - 0x858], ecx
mov dword [ebp - 0x854], edx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._memcpy
mov ecx, dword [ebp - 0x858]
mov edx, dword [ebp - 0x854]
lea eax, [ebp - 0x828]
cmp ecx, eax
je 0x406a58
mov eax, dword [ebp - 0x828]
mov dword [ebp - 0x854], edx
mov dword [esp], ecx
add eax, 1
mov dword [esp + 4], eax
call sym.operator_delete_void__unsigned_int_
mov edx, dword [ebp - 0x854]
mov eax, dword [ebp - 0x84c]
mov dword [ebp - 0x830], edx
mov dword [ebp - 0x828], eax
jmp 0x4068d7
add eax, 1
jmp 0x406655
test ebx, ebx
je 0x4067c2
movzx eax, byte [ebp - 0x828]
mov edi, dword [ebp + 8]
mov byte [edi + 8], al
test bl, 2
je 0x4067c2
movzx eax, word [ebp + ebx - 0x82a]
mov word [edx + ebx - 2], ax
jmp 0x4067c2
mov eax, dword [ebp - 0x83c]
add eax, 1
js 0x406603
mov ecx, dword [ebp - 0x83c]
mov dword [ebp - 0x84c], ecx
jmp 0x4069af
cmp dword [ebp - 0x83c], 0xf
jbe 0x4068b0
mov eax, dword [ebp - 0x83c]
test eax, eax
js 0x406b38
cmp eax, 0x1d
ja 0x406ab0
mov dword [ebp - 0x84c], 0x1e
mov eax, 0x1f
jmp 0x4069af
movzx edx, byte [ebp - 0x818]
mov byte [eax], dl
mov edx, dword [ebp - 0x830]
jmp 0x4068d7
movzx eax, byte [ebp - 0x818]
mov byte [edi], al
jmp 0x406a2d
movzx eax, byte [ecx]
mov byte [edx], al
jmp 0x4069f4
mov dword [esp], 0x5150e1
call method.std.__throw_length_error_char_const_
mov dword [esp], 0x515086
call method.std.__throw_length_error_char_const_
mov ebx, eax
jmp sym.retrieveFileContents_abi:cxx11__char_const__int____unsigned_int__unsigned_int____clone_.cold_