Function at 0x4011e0
Capabilities:
Receive http request
Send http response

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x164
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x160], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push esi
push edi
push 0x9d8
push 0
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], 0x9d8
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x40123c
lea eax, [edi + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x160]
xor ecx, esp
call fcn.004017e5
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x14], esi
push dword [esp + 0x10]
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x160]
push 0
push eax
push dword [esp + 0x18]
push edi
push 0
push esi
push ebx
push dword [esp + 0x28]
call dword [sym.imp.HTTPAPI.dll_HttpReceiveHttpRequest]
mov esi, eax
test esi, esi
jne 0x4013e1
mov eax, dword [edi + 0x24]
mov ecx, dword [edi + 0x3c]
push ecx
sub eax, 4
je 0x4012fa
sub eax, 2
je 0x4012db
push str.Got_a_unknown_request_for__ws__n
call fcn.00401010
push 0x120
lea eax, [esp + 0x4c]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, 9
mov dword [esp + 0x5c], 0xf01f7
mov word [esp + 0xd4], ax
lea eax, [esp + 0x178]
mov dword [esp + 0x60], str.Not_Implemented
jmp 0x401369
push str.Got_a_POST_request_for__ws__n
call fcn.00401010
mov ecx, dword [esp + 0x14]
add esp, 8
mov edx, edi
call fcn.00401470
mov esi, eax
jmp 0x4013b1
push str.Got_a_GET_request_for__ws__n
call fcn.00401010
push 0x120
lea eax, [esp + 0x4c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, 9
mov dword [esp + 0x5c], 0x200c8
mov word [esp + 0xd4], ax
mov eax, 1
mov word [esp + 0x164], ax
lea eax, [esp + 0x34]
mov dword [esp + 0x168], eax
lea eax, [esp + 0x17c]
mov dword [esp + 0x60], 0x403314
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], str.Hey__You_hit_the_server__r_n
mov dword [esp + 0x40], 0x1a
add esp, 0x14
mov dword [esp + 0xc4], str.text_html
push 0
push 0
push 0
push 0
push eax
push 0
lea eax, [esp + 0x58]
push eax
push 0
push dword [edi + 0x14]
push dword [edi + 0x10]
push dword [esp + 0x34]
call dword [sym.imp.HTTPAPI.dll_HttpSendHttpResponse]
mov esi, eax
test esi, esi
je 0x40123c
push esi
push str.HttpSendHttpResponse_failed_with__lu__n
call fcn.00401010
add esp, 8
test esi, esi
je 0x40123c
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x160]
xor ecx, esp
call fcn.004017e5
mov esp, ebp
pop ebp
ret
cmp esi, 0xea
jne 0x401445
mov esi, dword [edi + 0x14]
mov ebx, dword [edi + 0x10]
mov eax, dword [esp + 0x160]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x10]
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x401251
mov ecx, dword [esp + 0x16c]
mov esi, 8
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.004017e5
mov esp, ebp
pop ebp
ret
cmp esi, 0x4cd
jne 0x4013b9
test ebx, ebx
jne 0x40123c
cmp dword [esp + 0x14], ebx
je 0x4013b9
jmp 0x40123c