Function at 0x40b7ea
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push ebx
push esi
and dword [ebp - 0x190], 0
push edi
push dword [0x41fb10]
mov edi, str.document_root
lea eax, [ebp - 0x190]
push edi
push eax
call fcn.0040baba
push dword [0x41fb14]
lea eax, [ebp - 0x190]
push str.listening_port
push eax
call fcn.0040baba
lea eax, [ebp - 0x190]
push eax
push dword [ebp + 8]
call fcn.0040bb67
mov esi, 0x41e778
push str.processed_cmd_line_args
push esi
call fcn.0040a644
lea eax, [ebp - 0x190]
push edi
push eax
call fcn.0040bf25
lea eax, [ebp - 0x190]
push str.dav_auth_file
push eax
call fcn.0040bf25
lea eax, [ebp - 0x190]
push str.cgi_interpreter
push eax
call fcn.0040bf25
add esp, 0x40
lea eax, [ebp - 0x190]
push str.access_log_file
push eax
call fcn.0040bf25
lea eax, [ebp - 0x190]
push str.global_auth_file
push eax
call fcn.0040bf25
mov ebx, str.ssl_certificate
lea eax, [ebp - 0x190]
push ebx
push eax
call fcn.0040bf25
push str.set_abs_paths
push esi
call fcn.0040a644
add esp, 0x20
lea eax, [ebp - 0x190]
push 1
push edi
push eax
call fcn.0040be73
pop ecx
pop ecx
push eax
call fcn.0040beac
pop ecx
test eax, eax
pop ecx
jne 0x40b916
push dword [0x41fb10]
lea eax, [ebp - 0x190]
push edi
push eax
call fcn.0040baba
lea eax, [ebp - 0x190]
push edi
push eax
call fcn.0040bf25
push edi
push dword [0x420d84]
call fcn.00409d0f
push eax
push str.Setting_document_root_to___s_
call fcn.0040baa6
add esp, 0x24
push str.set_doc_root
push esi
call fcn.0040a644
push 1
lea eax, [ebp - 0x190]
push edi
push eax
call fcn.0040bee1
push 0
lea eax, [ebp - 0x190]
push str.cgi_interpreter
push eax
call fcn.0040bee1
push 0
lea eax, [ebp - 0x190]
push ebx
push eax
call fcn.0040bee1
push str.checked_path_existence
push esi
call fcn.0040a644
add esp, 0x34
cmp dword [ebp - 0x190], 0
je 0x40ba0f
lea eax, [ebp - 0x190]
lea ebx, [ebp - 0x190]
mov dword [ebp + 8], eax
push dword [ebx + 4]
mov eax, dword [ebp + 8]
push dword [eax]
push dword [0x420d84]
call fcn.0040947b
add esp, 0xc
test eax, eax
je 0x40b9ea
push eax
push dword [ebx + 4]
push dword [ebx]
push str.Failed_to_set_option___s__to___s_:__s
call fcn.0040baa6
push str.listening_port
mov dword [ebp + 8], ebx
push dword [ebx]
call sub.MSVCRT.dll_strcmp
add esp, 0x18
test eax, eax
jne 0x40b9ea
push dword [0x41fb14]
push str.listening_port
push dword [0x420d84]
call fcn.0040947b
push dword [0x41fb14]
mov dword [ebp + 8], ebx
push dword [ebx]
push str.Setting__s_to___s_
call fcn.0040baa6
add esp, 0x18
mov eax, dword [ebp + 8]
push dword [eax]
call dword [sym.imp.MSVCRT.dll_free]
push dword [ebx + 4]
call dword [sym.imp.MSVCRT.dll_free]
add ebx, 8
pop ecx
pop ecx
mov dword [ebp + 8], ebx
cmp dword [ebx], 0
jne 0x40b97c
push str.set_all_options
push esi
call fcn.0040a644
push edi
push dword [0x420d84]
call fcn.00409d0f
push eax
call dword [sym.imp.MSVCRT.dll__chdir]
push str.chdir_to_document_root
push esi
call fcn.0040a644
push str.MONGOOSE_LISTENING_SOCKET
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 0x20
test eax, eax
je 0x40ba63
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
test eax, eax
pop ecx
jle 0x40ba63
push str.setting_listening_sock
push esi
call fcn.0040a644
pop ecx
pop ecx
mov edi, dword [sym.imp.MSVCRT.dll_signal]
mov ebx, 0x40ba8b
push ebx
push 0xf
call edi
push ebx
push 2
call edi
push str.set_signal_handlers
push esi
call fcn.0040a644
add esp, 0x18
pop edi
pop esi
pop ebx
leave
ret