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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x55ca98]
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 0x478d8b
mov edi, dword [eax + 8]
jmp 0x478d8d
xor edi, edi
mov dword [ebp - 0x8c], edi
test esi, esi
je 0x478db0
cmp dword [esi + 0xc], 0
mov dword [esi], 0
mov dword [esi + 4], 0
jbe 0x478db0
mov eax, dword [esi + 8]
mov byte [eax], 0
cmp dword [0x55fcbc], 0
jne 0x478e9e
mov ebx, dword [str.8080]
mov dword [ebp - 0x94], ebx
test edi, edi
je 0x478e2a
mov eax, dword [edi]
mov ebx, edi
test eax, eax
je 0x478e24
mov ecx, str.listening_ports
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x478e00
test dl, dl
je 0x478dfc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x478e00
add eax, 2
add ecx, 2
test dl, dl
jne 0x478de0
xor eax, eax
jmp 0x478e05
sbb eax, eax
or eax, 1
test eax, eax
jne 0x478e12
mov eax, dword [ebx + 4]
mov dword [ebp - 0x94], eax
mov eax, dword [ebx + 8]
add ebx, 8
test eax, eax
jne 0x478dd5
mov ebx, dword [ebp - 0x94]
jmp 0x478e2a
mov ebx, dword [str.8080]
test ebx, ebx
je 0x478e6e
mov edx, ebx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x478e33
sub edx, ecx
xor ecx, ecx
test edx, edx
jle 0x478e6e
test al, al
je 0x478e5d
lea eax, [ecx + ebx]
mov bl, byte [eax]
cmp bl, 0x73
je 0x478e97
cmp bl, 0x72
je 0x478e97
mov ebx, dword [ebp - 0x94]
jmp 0x478e60
lea eax, [ebx + ecx]
mov al, byte [eax]
inc ecx
sub al, 0x30
cmp al, 9
setbe al
cmp ecx, edx
jl 0x478e42
xor eax, eax
push eax
call fcn.004774a0
add esp, 4
cmp dword [0x55fcbc], 0
jne 0x478e9e
test esi, esi
je 0x4795c0
mov dword [esi], 8
push str.Library_uninitialized
jmp 0x478ece
mov eax, 2
jmp 0x478e70
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 0x478ef8
test esi, esi
je 0x4795c0
mov dword [esi], 6
mov dword [esi + 4], 0x7de0
push str.Out_of_memory
push 0x5136ec
push dword [esi + 0xc]
push dword [esi + 8]
push 0
push 0
call fcn.00478b30
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005091c5
mov esp, ebp
pop ebp
ret
call fcn.004746d0
mov ecx, eax
mov esi, edx
mov eax, edi
cdq
xor ecx, eax
xor esi, edx
push 0x55fca4
mov dword [ebx + 0x7dd0], ecx
mov dword [ebx + 0x7dd4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x55fcc4]
inc eax
mov dword [0x55fcc4], eax
mov esi, dword [0x55fcc4]
push 0x55fca4
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 [0x55fcc0]
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 0x479009
mov eax, dword [ecx]
test eax, eax
je 0x479004
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 0x47900b
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 0x4790c0
mov edi, dword [esi]
test edi, edi
je 0x4790c0
push edi
call fcn.00474670
add esp, 4
mov dword [ebp - 0x8c], eax
cmp eax, 0xffffffff
je 0x47918a
mov ecx, dword [esi + 4]
add esi, 8
mov dword [ebp - 0x90], ecx
test ecx, ecx
je 0x479158
cmp dword [ebx + eax*4 + 0x7ccc], 0
je 0x4790a1
push edi
push str.warning:__s:_duplicate_option
push 0x50f3
push str.mg_start2
push ebx
push 0
call fcn.0040d4d0
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.00479760
mov ecx, dword [ebp - 0x8c]
add esp, 8
mov dword [ebx + ecx*4 + 0x7ccc], eax
test esi, esi
jne 0x479033
xor edi, edi
lea esi, [ebx + 0x7ccc]
xor eax, eax
nop word [eax + eax]
cmp dword [esi], 0
jne 0x4790eb
mov eax, dword [eax + 0x51de88]
test eax, eax
je 0x4790eb
push ebx
push eax
call fcn.00479760
add esp, 8
mov dword [esi], eax
inc edi
add esi, 4
lea eax, [edi + edi*2]
shl eax, 2
cmp dword [eax + 0x51de80], 0
jne 0x4790d0
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 0x4791c5
push str.max_request_size
push str._s_too_small
push 0x5107
push str.mg_start2
push ebx
push 0
call fcn.0040d4d0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x4795a8
mov dword [ecx + 4], 4
push str.max_request_size
jmp 0x47958b
push edi
push str._s:_option_value_cannot_be_NULL
push 0x50e0
push str.mg_start2
push ebx
push 0
call fcn.0040d4d0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x4795a8
mov dword [ecx + 4], eax
push edi
jmp 0x47958b
push edi
push str.Invalid_option:__s
push 0x50cf
push str.mg_start2
push ebx
push 0
call fcn.0040d4d0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x4795a8
push edi
mov dword [ecx + 4], 0xffffffff
push str.Invalid_configuration_option:__s
jmp 0x479590
push dword [ebx + 0x7ce4]
mov dword [ebx + 0x8c], eax
call edi
mov esi, eax
add esp, 4
cmp esi, 1
jge 0x47921b
push str.connection_queue
push str._s_too_small
push 0x511f
push str.mg_start2
push ebx
push 0
call fcn.0040d4d0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x4795a8
mov dword [ecx + 4], 6
push str.connection_queue
jmp 0x47958b
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 0x479278
push str.connection_queue
push str.Out_of_memory:_Cannot_allocate__s
push 0x5134
push str.mg_start2
push ebx
push eax
call fcn.0040d4d0
mov ecx, dword [ebp - 0x88]
add esp, 0x18
test ecx, ecx
je 0x4795a8
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 0x479596
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 0x479575
cmp dword [ebx + 0x7d10], 0
je 0x4792c6
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x4795a8
mov dword [ecx + 4], 0x11
push str.document_root
jmp 0x47958b
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 0x47930d
cmp dword [ebp - 0x8c], 0
mov eax, str.__WoW64_
mov ecx, 0x5137ab
cmove eax, ecx
jmp 0x479312
mov eax, 0x520064
push eax
push esi
push edi
lea eax, [ebp - 0x84]
push str.Windows__u._u_s
push eax
call fcn.00401620
lea ecx, [ebp - 0x84]
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479332
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 0x479376
cmp byte [ebp - 0x84], 0
mov ecx, edi
je 0x479373
lea edx, [ebp - 0x84]
sub edx, edi
cmp esi, 1
jbe 0x479373
mov al, byte [edx + ecx]
dec esi
mov byte [ecx], al
inc ecx
cmp byte [edx + ecx], 0
jne 0x479361
mov byte [ecx], 0
push ebx
mov dword [ebx + 0x7c50], edi
call fcn.0047c460
add esp, 4
test eax, eax
jne 0x4793ac
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x4795a8
push str.Failed_to_setup_server_ports
mov dword [ecx], 0xa
push 0x5136ec
jmp 0x479596
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.00473b10
add esp, 8
cmp eax, 0xffffffff
jne 0x4793fa
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x4795a8
push str.Failed_to_setup_access_control_list
mov dword [ecx], 0xc
push 0x5136ec
jmp 0x479596
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 0x479444
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x4795a8
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 0x5136ec
jmp 0x479596
push 0x570
push dword [ebx + 0x34]
call esi
add esp, 8
mov dword [ebx + 0x10], eax
test eax, eax
jne 0x479485
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x4795a8
mov dword [ecx], 6
imul eax, dword [ebx + 0x34], 0x570
push str.Not_enough_memory_for_worker_thread_connection_array
push 0x5136ec
mov dword [ecx + 4], eax
jmp 0x479596
mov eax, dword [ebx + 0x7cac]
test eax, eax
je 0x479495
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 0x47950e
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 0x47c9a0
push 0
push 0
call ecx
mov ecx, eax
add esp, 0x18
test ecx, ecx
je 0x479550
mov eax, dword [ebp - 0x90]
test eax, eax
je 0x479550
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 0x4794b6
mov ecx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
push 0
push 0
push ebx
push 0x4764b0
push 0
push 0
lea esi, [ebx + 0x30]
call ecx
add esp, 0x18
test eax, eax
je 0x47952e
test esi, esi
je 0x47952e
mov dword [esi], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push dword [0x55fcc0]
call eax
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005091c5
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x479508
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x4795a8
push eax
mov dword [ecx], 9
mov dword [ecx + 4], eax
push str.Cannot_create_first_worker_thread:_error__ld
jmp 0x479596
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x4795a8
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.00478b30
add esp, 0x18
push ebx
call fcn.00474230
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
add esp, 4
push 0
push dword [0x55fcc0]
call eax
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005091c5
mov esp, ebp
pop ebp
ret