Function at 0x4048c0
Capabilities:
Send http response

Disassembly:
push 0xffffffffffffffff
push 0x4d4b3b
mov eax, dword fs:[0]
push eax
sub esp, 0x150
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54d158]
xor eax, esp
push eax
lea eax, [esp + 0x164]
mov dword fs:[0], eax
mov edi, ecx
movzx esi, word [edi + 0x54]
xor ebx, ebx
cmp si, bx
ja 0x404901
xor eax, eax
jmp 0x404b84
push 0x118
lea eax, [esp + 0x48]
push ebx
push eax
call fcn.004b0770
mov eax, 0x51c3b0
add esp, 0xc
mov word [esp + 0x4c], 0xc8
mov dword [esp + 0x50], eax
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x404927
sub eax, ecx
mov word [esp + 0x4e], ax
movzx eax, si
lea ecx, [eax + eax*2]
add ecx, ecx
add ecx, ecx
push ecx
push ebx
mov dword [esp + 0xd0], str.text_html
mov word [esp + 0xcc], 9
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp word [edi + 0x54], bx
mov ebp, eax
mov dword [esp + 0x18], ebp
jbe 0x404a67
mov eax, 0xfffffffc
sub eax, ebp
lea esi, [ebp + 4]
mov dword [esp + 0x1c], eax
jmp 0x404989
mov eax, dword [esp + 0x1c]
mov edx, dword [edi + 0x58]
lea ebp, [eax + esi]
mov eax, dword [edx + ebp + 4]
push eax
lea ecx, [esp + 0x18]
call fcn.0040fd30
mov ecx, dword [esp + 0x14]
push str.Access_Control_Request_Method
push ecx
call fcn.004ad47d
add esp, 8
test eax, eax
jne 0x4049bb
mov dword [esi], str.Access_Control_Allow_Methods
jmp 0x4049fd
mov edx, dword [esp + 0x14]
push str.Origin
push edx
call fcn.004ad47d
add esp, 8
test eax, eax
jne 0x4049d9
mov dword [esi], str.Access_Control_Allow_Origin
jmp 0x4049fd
mov eax, dword [esp + 0x14]
push str.Access_Control_Request_Headers
push eax
call fcn.004ad47d
add esp, 8
test eax, eax
jne 0x4049f7
mov dword [esi], str.Access_Control_Allow_Headers
jmp 0x4049fd
mov dword [esi], str.Access_Control_Allow_Credentials
mov eax, dword [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404a02
sub eax, edx
mov word [esi - 4], ax
mov ecx, dword [edi + 0x58]
mov eax, dword [ecx + ebp + 8]
mov dword [esi + 4], eax
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x404a20
sub eax, ecx
mov word [esi - 2], ax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404a4f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
movzx ecx, word [edi + 0x54]
add ebx, 1
add esi, 0xc
cmp ebx, ecx
jl 0x404985
mov ebp, dword [esp + 0x18]
xor ebx, ebx
mov dx, word [edi + 0x54]
lea eax, [esp + 0x24]
mov dword [esp + 0x158], eax
mov eax, str.option
mov word [esp + 0x54], dx
mov word [esp + 0x5c], bx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x58], ebp
mov dword [esp + 0x24], ebx
mov word [esp + 0x154], 1
mov dword [esp + 0x2c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404aa2
push ebx
push ebx
push ebx
push ebx
sub eax, edx
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [edi + 0x10]
push ebx
lea edx, [esp + 0x5c]
push edx
mov edx, dword [esp + 0x190]
push ebx
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x14]
push eax
push ecx
push edx
call dword [sym.imp.HTTPAPI.dll_HttpSendHttpResponse]
mov edi, eax
cmp edi, ebx
je 0x404b6f
call fcn.004a08e6
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x404afb
push 0x80004005
call fcn.004103e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push edi
lea ecx, [esp + 0x18]
push str.HttpSendHttpResponse_failed___d__n
push ecx
mov dword [esp + 0x178], ebx
call fcn.00410070
mov esi, dword [esp + 0x20]
add esi, 0xfffffff0
push esi
call fcn.0040ff10
add esp, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404b4b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x16c], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b6f
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
cmp ebp, ebx
je 0x404b82
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov ecx, dword [esp + 0x164]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x15c
ret