Function at 0x4682e0
Capabilities:
Create thread
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x51df40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x98], 0
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x88], esi
push edi
test eax, eax
je 0x46831b
mov edi, dword [eax + 8]
jmp 0x46831d
xor edi, edi
mov dword [ebp - 0x8c], edi
test esi, esi
je 0x468340
cmp dword [esi + 0xc], 0
mov dword [esi], 0
mov dword [esi + 4], 0
jbe 0x468340
mov eax, dword [esi + 8]
mov byte [eax], 0
cmp dword [0x520a2c], 0
jne 0x468422
mov ebx, dword [str.8080]
mov dword [ebp - 0x94], ebx
test edi, edi
je 0x4683ba
mov eax, dword [edi]
mov ebx, edi
test eax, eax
je 0x4683b4
mov ecx, str.listening_ports
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x468390
test dl, dl
je 0x46838c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x468390
add eax, 2
add ecx, 2
test dl, dl
jne 0x468370
xor eax, eax
jmp 0x468395
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4683a2
mov eax, dword [ebx + 4]
mov dword [ebp - 0x94], eax
mov eax, dword [ebx + 8]
add ebx, 8
test eax, eax
jne 0x468365
mov ebx, dword [ebp - 0x94]
jmp 0x4683ba
mov ebx, dword [str.8080]
test ebx, ebx
je 0x4683f2
mov edx, ebx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4683c3
sub edx, ecx
xor ecx, ecx
test edx, edx
jle 0x4683f2
test al, al
je 0x4683e1
mov al, byte [ecx + ebx]
cmp al, 0x73
je 0x46841b
cmp al, 0x72
je 0x46841b
lea eax, [ecx + ebx]
inc ecx
mov al, byte [eax]
sub al, 0x30
cmp al, 9
setbe al
cmp ecx, edx
jl 0x4683d2
xor eax, eax
push eax
call fcn.004669e0
add esp, 4
cmp dword [0x520a2c], 0
jne 0x468422
test esi, esi
je 0x468b4f
mov dword [esi], 8
push str.Library_uninitialized
jmp 0x468452
mov eax, 2
jmp 0x4683f4
push 0x7de0
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x46847c
test esi, esi
je 0x468b4f
mov dword [esi], 6
mov dword [esi + 4], 0x7de0
push str.Out_of_memory
push 0x4dc7f0
push dword [esi + 0xc]
push dword [esi + 8]
push 0
push 0
call fcn.004680c0
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
call fcn.00463bd0
mov ecx, eax
mov esi, edx
mov eax, edi
cdq
xor ecx, eax
xor esi, edx
push 0x520a14
mov dword [ebx + 0x7dd0], ecx
mov dword [ebx + 0x7dd4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x520a34]
inc eax
mov dword [0x520a34], eax
mov esi, dword [0x520a34]
push 0x520a14
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebx + 0x3c], esi
mov dword [ebp - 0xc0], 0xffffffff
mov eax, dword [ebx + 0x3c]
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0xc0]
push eax
push dword [0x520a30]
mov dword [ebp - 0xb4], 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebx + 0x18]
push eax
call edi
lea esi, [ebx + 0x68]
push esi
call edi
mov dword [esi + 0x18], 0
lea esi, [ebx + 0x4c]
push esi
call edi
lea eax, [ebx + 0x7c60]
mov dword [esi + 0x18], 0
push eax
mov dword [ebx + 0x84], 0
call edi
mov ecx, dword [ebp - 0x90]
test ecx, ecx
je 0x46858d
mov eax, dword [ecx]
test eax, eax
je 0x468588
movups xmm0, xmmword [eax]
movups xmmword [ebx + 0x7c78], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebx + 0x7c88], xmm0
movups xmm0, xmmword [eax + 0x20]
movups xmmword [ebx + 0x7c98], xmm0
movups xmm0, xmmword [eax + 0x30]
movups xmmword [ebx + 0x7ca8], xmm0
movq xmm0, qword [eax + 0x40]
movq qword [ebx + 0x7cb8], xmm0
mov eax, dword [ecx]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x98], eax
mov dword [ebx + 0x7cb0], 0
mov eax, dword [ecx + 4]
jmp 0x46858f
xor eax, eax
mov esi, dword [ebp - 0x8c]
mov dword [ebx + 0x7cc0], eax
mov dword [ebx + 0x7dc0], 0
mov dword [ebx + 0x7ddc], 0
test esi, esi
je 0x46864d
nop word [eax + eax]
mov edi, dword [esi]
test edi, edi
je 0x46864d
push edi
call fcn.00463b70
add esp, 4
mov dword [ebp - 0x8c], eax
cmp eax, 0xffffffff
je 0x468711
mov ecx, dword [esi + 4]
add esi, 8
mov dword [ebp - 0x90], ecx
test ecx, ecx
je 0x4686df
cmp dword [ebx + eax*4 + 0x7ccc], 0
je 0x46862e
push edi
push str.warning:__s:_duplicate_option
push 0x50f3
push str.mg_start2
push ebx
push 0
call fcn.0040c9b0
push dword [ebx + eax*4 + 0x7ccc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp - 0x90]
add esp, 0x1c
push ebx
push ecx
call fcn.00468cf0
mov ecx, dword [ebp - 0x8c]
add esp, 8
mov dword [ebx + ecx*4 + 0x7ccc], eax
test esi, esi
jne 0x4685c0
xor edi, edi
lea esi, [ebx + 0x7ccc]
xor eax, eax
cmp dword [esi], 0
jne 0x468672
mov eax, dword [eax + 0x4e52b0]
test eax, eax
je 0x468672
push ebx
push eax
call fcn.00468cf0
add esp, 8
mov dword [esi], eax
inc edi
add esi, 4
lea eax, [edi + edi*2]
shl eax, 2
cmp dword [eax + 0x4e52a8], 0
jne 0x468657
push dword [ebx + 0x7cdc]
mov edi, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
call edi
add esp, 4
cmp eax, 0x400
jge 0x46874c
push str.max_request_size
push str._s_too_small
push 0x5107
push str.mg_start2
push ebx
push 0
call fcn.0040c9b0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x468b37
mov dword [ecx + 4], 4
push str.max_request_size
jmp 0x468b1a
push edi
push str._s:_option_value_cannot_be_NULL
push 0x50e0
push str.mg_start2
push ebx
push 0
call fcn.0040c9b0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x468b37
mov dword [ecx + 4], eax
push edi
jmp 0x468b1a
push edi
push str.Invalid_option:__s
push 0x50cf
push str.mg_start2
push ebx
push 0
call fcn.0040c9b0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x468b37
push edi
mov dword [ecx + 4], 0xffffffff
push str.Invalid_configuration_option:__s
jmp 0x468b1f
push dword [ebx + 0x7ce4]
mov dword [ebx + 0x8c], eax
call edi
mov esi, eax
add esp, 4
cmp esi, 1
jge 0x4687a2
push str.connection_queue
push str._s_too_small
push 0x511f
push str.mg_start2
push ebx
push 0
call fcn.0040c9b0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x468b37
mov dword [ecx + 4], 6
push str.connection_queue
jmp 0x468b1a
push 0x28
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov dword [ebx + 0x40], eax
test eax, eax
jne 0x4687ff
push str.connection_queue
push str.Out_of_memory:_Cannot_allocate__s
push 0x5134
push str.mg_start2
push ebx
push eax
call fcn.0040c9b0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x468b37
lea eax, [esi + esi*4]
mov dword [ecx], 6
shl eax, 3
push str.connection_queue
mov dword [ecx + 4], eax
push str.Out_of_memory:_Cannot_allocate__s
jmp 0x468b25
push dword [ebx + 0x7cd0]
mov dword [ebx + 0x88], esi
call edi
add esp, 4
mov dword [ebp - 0x90], eax
lea ecx, [eax - 1]
cmp ecx, 0xffff
ja 0x468b04
cmp dword [ebx + 0x7d10], 0
je 0x46884d
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x468b37
mov dword [ecx + 4], 0x11
push str.document_root
jmp 0x468b1a
mov dword [ebp - 0x8c], 0
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx esi, ax
movzx edi, al
lea eax, [ebp - 0x8c]
push eax
shr esi, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x468894
cmp dword [ebp - 0x8c], 0
mov eax, str.__WoW64_
mov ecx, 0x4dcf03
cmove eax, ecx
jmp 0x468899
mov eax, 0x4e74e0
push eax
push esi
push edi
lea eax, [ebp - 0x84]
push str.Windows__u._u_s
push eax
call fcn.00404950
lea ecx, [ebp - 0x84]
add esp, 0x14
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4688c0
sub ecx, edx
lea esi, [ecx + 1]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x468905
cmp byte [ebp - 0x84], 0
mov ecx, edi
je 0x468902
lea edx, [ebp - 0x84]
sub edx, edi
nop
cmp esi, 1
jbe 0x468902
mov al, byte [edx + ecx]
dec esi
mov byte [ecx], al
inc ecx
cmp byte [edx + ecx], 0
jne 0x4688f0
mov byte [ecx], 0
push ebx
mov dword [ebx + 0x7c50], edi
call fcn.0046b950
add esp, 4
test eax, eax
jne 0x46893b
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x468b37
push str.Failed_to_setup_server_ports
mov dword [ecx], 0xa
push 0x4dc7f0
jmp 0x468b25
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0xa8], xmm0
mov word [ebp - 0xa8], ax
lea eax, [ebp - 0xa8]
push eax
push ebx
call fcn.00463010
add esp, 8
cmp eax, 0xffffffff
jne 0x468989
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x468b37
push str.Failed_to_setup_access_control_list
mov dword [ecx], 0xc
push 0x4dc7f0
jmp 0x468b25
mov eax, dword [ebp - 0x90]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
push 4
push eax
mov dword [ebx + 0x34], eax
call esi
add esp, 8
mov dword [ebx + 0x38], eax
test eax, eax
jne 0x4689d3
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x468b37
mov dword [ecx], 6
mov eax, dword [ebx + 0x34]
shl eax, 2
push str.Not_enough_memory_for_worker_thread_ID_array
mov dword [ecx + 4], eax
push 0x4dc7f0
jmp 0x468b25
push 0x570
push dword [ebx + 0x34]
call esi
add esp, 8
mov dword [ebx + 0x10], eax
test eax, eax
jne 0x468a14
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x468b37
mov dword [ecx], 6
imul eax, dword [ebx + 0x34], 0x570
push str.Not_enough_memory_for_worker_thread_connection_array
push 0x4dc7f0
mov dword [ecx + 4], eax
jmp 0x468b25
mov eax, dword [ebx + 0x7cac]
test eax, eax
je 0x468a24
push ebx
call eax
add esp, 4
mov eax, dword [ebp - 0x98]
xor esi, esi
mov ecx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov dword [ebx + 0x7cb0], eax
mov dword [ebx], 1
cmp dword [ebx + 0x34], esi
jbe 0x468a9d
xor edi, edi
mov eax, dword [ebx + 0x10]
push 0
push 0
mov dword [edi + eax + 0x4a8], ebx
mov eax, dword [ebx + 0x38]
lea eax, [eax + esi*4]
mov dword [ebp - 0x90], eax
mov eax, dword [ebx + 0x10]
add eax, edi
push eax
push 0x46be90
push 0
push 0
call ecx
mov ecx, eax
add esp, 0x18
test ecx, ecx
je 0x468adf
mov eax, dword [ebp - 0x90]
test eax, eax
je 0x468adf
mov dword [eax], ecx
inc esi
mov ecx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add edi, 0x570
cmp esi, dword [ebx + 0x34]
jb 0x468a45
mov ecx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
push 0
push 0
push ebx
push 0x4659b0
push 0
push 0
lea esi, [ebx + 0x30]
call ecx
add esp, 0x18
test eax, eax
je 0x468abd
test esi, esi
je 0x468abd
mov dword [esi], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push dword [0x520a30]
call eax
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x468a97
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x468b37
push eax
mov dword [ecx], 9
mov dword [ecx + 4], eax
push str.Cannot_create_first_worker_thread:_error__ld
jmp 0x468b25
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x468b37
mov dword [ecx + 4], 1
push str.num_threads
push str.Invalid_configuration_option_value:__s
mov dword [ecx], 2
push dword [ecx + 0xc]
push dword [ecx + 8]
push 0
push 0
call fcn.004680c0
add esp, 0x18
push ebx
call fcn.00463730
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
add esp, 4
push 0
push dword [0x520a30]
call eax
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret