Function at 0x4127c0
Capabilities:
Allocate thread local storage
Initialize winsock library
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x288
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x234]
push esi
push edi
push eax
push 0x202
mov dword [ebp - 0x260], ecx
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x264], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x4a0
push 1
call fcn.004296e8
mov edi, eax
add esp, 8
mov dword [ebp - 0x25c], edi
test edi, edi
je 0x412cef
xorps xmm0, xmm0
xorps xmm1, xmm1
movups xmmword [ebp - 0xa4], xmm0
movsd xmm0, qword [0x456938]
ucomisd xmm0, xmm1
movsd qword [ebp - 0x24c], xmm1
lahf
test ah, 0x44
jp 0x412887
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov edx, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x94]
call fcn.00443fa0
movsd xmm1, qword [0x451a20]
divsd xmm1, xmm0
ucomisd xmm1, qword [ebp - 0x24c]
movsd qword [0x456938], xmm1
lahf
test ah, 0x44
jnp 0x4128eb
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x94]
call fcn.00443fa0
mulsd xmm0, qword [0x456938]
movsd qword [ebp - 0x24c], xmm0
call fcn.00443ef0
mov ecx, eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], edx
call fcn.00444000
movsd xmm1, qword [ebp - 0x24c]
subsd xmm1, xmm0
mulsd xmm1, qword [0x451a30]
cvttsd2si eax, xmm1
mov dword [ebp - 0x9c], eax
mov eax, dword [0x456c80]
or eax, dword [0x456c84]
jne 0x4129a1
push eax
call fcn.0042933f
mov dword [ebp - 0x248], eax
lea ecx, [ebp - 0xa4]
mov eax, dword [ebp - 0xa4]
add esp, 4
mov dword [ebp - 0x244], edx
mov edx, dword [ebp - 0xa0]
shld edx, eax, 0x19
shl eax, 0x19
mov dword [ebp - 0x250], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x254], edx
cdq
add dword [ebp - 0x250], eax
lea eax, [ebp - 0xa4]
adc dword [ebp - 0x254], edx
cdq
add dword [ebp - 0x250], eax
mov eax, dword [ebp - 0x248]
adc dword [ebp - 0x254], edx
shld dword [ebp - 0x244], eax, 0xc
mov esi, dword [ebp - 0x244]
xor esi, dword [ebp - 0xa0]
shl eax, 0xc
xor eax, dword [ebp - 0xa4]
shld esi, eax, 0x15
shl eax, 0x15
mov dword [ebp - 0x248], eax
mov eax, dword [ebp - 0x9c]
xor eax, ecx
mov ecx, dword [ebp - 0x248]
cdq
xor ecx, eax
xor esi, edx
jmp 0x412a11
push 0x5851f42d
push 0x4c957f2d
push dword [0x456924]
push dword [0x456920]
call fcn.004438a0
add eax, 0xf767814f
mov dword [ebp - 0x250], eax
mov eax, dword [0x456c84]
adc edx, 0x14057b7e
mov dword [ebp - 0x254], edx
mov ecx, eax
mov edx, dword [0x456c80]
mov esi, edx
shld ecx, esi, 1
add esi, esi
xor ecx, eax
xor esi, edx
shld ecx, esi, 2
shl esi, 2
xor ecx, eax
xor esi, edx
shld ecx, esi, 1
xor ecx, ecx
add esi, esi
xor esi, edx
shrd edx, eax, 1
and esi, 0xfffffff0
shl esi, 0x1b
or ecx, edx
shr eax, 1
or esi, eax
mov eax, dword [ebp - 0x250]
mov dword [0x456920], eax
mov eax, dword [ebp - 0x254]
mov dword [0x456924], eax
mov eax, ebx
xor eax, dword [ebp - 0x9c]
cdq
xor eax, ecx
mov dword [0x456c84], esi
xor eax, dword [ebp - 0x250]
xor edx, esi
xor edx, dword [ebp - 0x254]
mov esi, 1
mov dword [edi + 0x488], eax
mov eax, esi
mov dword [0x456c80], ecx
mov dword [edi + 0x48c], edx
lock xadd dword [0x45695c], eax
inc eax
mov ebx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp eax, esi
jne 0x412ac1
push 0x456944
call ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x456c8c], eax
cmp eax, 0xffffffff
jne 0x412ac9
lock dec dword [0x45695c]
push str.Cannot_initialize_thread_local_storage
push 0x456960
mov dword [0x456bd0], edi
call fcn.004064e0
push edi
call fcn.00425f00
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x240], 0xffffffff
lock xadd dword [0x456930], esi
inc esi
lea eax, [ebp - 0x240]
mov dword [ebp - 0x23c], esi
push eax
push dword [0x456c8c]
mov dword [ebp - 0x238], 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
lea esi, [edi + 0xe8]
mov dword [ebp - 0x248], eax
push esi
mov dword [edi + 0xe4], eax
call ebx
push 4
push 0x10000
mov dword [esi + 0x18], 0
call fcn.004296e8
add esp, 8
mov ebx, eax
mov dword [esi + 0x1c], ebx
lea esi, [edi + 0x450]
push esi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 4
push 0x10000
mov dword [esi + 0x18], 0
call fcn.004296e8
add esp, 8
mov dword [esi + 0x1c], eax
lea esi, [edi + 0x430]
mov dword [ebp - 0x244], eax
push esi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 4
push 0x10000
mov dword [esi + 0x18], 0
call fcn.004296e8
add esp, 8
mov edi, eax
mov dword [esi + 0x1c], edi
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
xor edx, edx
mov esi, eax
mov eax, dword [ebp - 0x25c]
test ebx, ebx
mov ebx, dword [ebp - 0x25c]
setne dl
xor ecx, ecx
cmp dword [ebp - 0x248], ecx
mov dword [eax + 0x490], esi
setne cl
and edx, ecx
mov ecx, dword [ebp - 0x244]
neg ecx
sbb ecx, ecx
xor eax, eax
and ecx, edx
test edi, edi
setne al
and ecx, eax
neg esi
sbb esi, esi
test ecx, esi
jne 0x412c03
push str.Cannot_initialize_thread_synchronization_objects
push 0x456960
mov dword [0x456bd0], ebx
call fcn.004064e0
push ebx
call fcn.00425f00
add esp, 0xc
jmp 0x412ce0
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x412c40
movups xmm0, xmmword [eax]
movups xmmword [ebx + 0x9c], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebx + 0xac], xmm0
movups xmm0, xmmword [eax + 0x20]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x264], eax
movups xmmword [ebx + 0xbc], xmm0
mov dword [ebx + 0xc8], 0
mov eax, dword [ebp - 0x258]
mov dword [ebx + 0xcc], 0
mov dword [ebx + 0x49c], 0
test eax, eax
je 0x412dbd
mov edi, dword [eax]
add eax, 4
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x258], eax
test edi, edi
je 0x412dbd
mov eax, dword [str.cgi_pattern]
xor esi, esi
test eax, eax
je 0x412cc0
mov ecx, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x412ca8
test dl, dl
je 0x412ca4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x412ca8
add eax, 2
add ecx, 2
test dl, dl
jne 0x412c88
xor eax, eax
jmp 0x412cad
sbb eax, eax
or eax, 1
test eax, eax
je 0x412d02
inc esi
lea eax, [esi + esi*2]
mov eax, dword [eax*4 + 0x454c40]
test eax, eax
jne 0x412c86
push edi
mov dword [0x456bd0], ebx
push str.Invalid_option:__s
push 0x456960
call fcn.004064e0
add esp, 0xc
mov ecx, ebx
call fcn.00412650
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push dword [0x456c8c]
call eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
je 0x412cc0
mov eax, dword [ebp - 0x258]
mov edi, dword [eax]
add eax, 4
mov dword [ebp - 0x260], edi
mov dword [ebp - 0x258], eax
test edi, edi
je 0x412f40
cmp dword [ebx + esi*4 + 8], 0
je 0x412d57
push dword [ebp - 0x248]
mov dword [0x456bd0], ebx
push str.warning:__s:_duplicate_option
push 0x456960
call fcn.004064e0
add esp, 0xc
push dword [ebx + esi*4 + 8]
call fcn.00425f00
add esp, 4
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x412d60
sub ecx, edx
lea edi, [ecx + 1]
push edi
call fcn.00425f1b
add esp, 4
mov dword [ebp - 0x248], eax
test eax, eax
je 0x412dab
mov edx, dword [ebp - 0x260]
mov ecx, eax
cmp byte [edx], 0
je 0x412da8
sub edx, eax
nop
cmp edi, 1
jbe 0x412da2
mov al, byte [edx + ecx]
dec edi
mov byte [ecx], al
inc ecx
cmp byte [edx + ecx], 0
jne 0x412d90
mov eax, dword [ebp - 0x248]
mov byte [ecx], 0
mov dword [ebx + esi*4 + 8], eax
mov eax, dword [ebp - 0x258]
test eax, eax
jne 0x412c62
xor edx, edx
mov dword [ebp - 0x248], edx
cmp dword [str.cgi_pattern], edx
je 0x412e5a
lea ecx, [ebx + 8]
xor eax, eax
mov dword [ebp - 0x244], ecx
nop dword [eax]
cmp dword [ecx], 0
jne 0x412e3b
mov edi, dword [eax + 0x454c48]
test edi, edi
je 0x412e3b
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x412df4
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.00425f1b
mov edx, eax
add esp, 4
test edx, edx
je 0x412e2d
cmp byte [edi], 0
mov ecx, edx
je 0x412e2a
sub edi, edx
cmp esi, 1
jbe 0x412e2a
mov al, byte [edi + ecx]
dec esi
mov byte [ecx], al
inc ecx
cmp byte [edi + ecx], 0
jne 0x412e18
mov byte [ecx], 0
mov ecx, dword [ebp - 0x244]
mov dword [ecx], edx
mov edx, dword [ebp - 0x248]
inc edx
add ecx, 4
mov dword [ebp - 0x248], edx
mov dword [ebp - 0x244], ecx
lea eax, [edx + edx*2]
shl eax, 2
cmp dword [eax + 0x454c40], 0
jne 0x412de0
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx ecx, ax
shr ecx, 8
push ecx
movzx eax, al
push eax
lea eax, [ebp - 0x8c]
push str.Windows__u._u
push eax
call fcn.004058a0
lea ecx, [ebp - 0x8c]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x412e88
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.00425f1b
mov edi, eax
add esp, 4
test edi, edi
je 0x412ecb
cmp byte [ebp - 0x8c], 0
mov ecx, edi
je 0x412ec8
lea edx, [ebp - 0x8c]
sub edx, edi
cmp esi, 1
jbe 0x412ec8
mov al, byte [edx + ecx]
dec esi
mov byte [ecx], al
inc ecx
cmp byte [edx + ecx], 0
jne 0x412eb6
mov byte [ecx], 0
xorps xmm0, xmm0
mov dword [ebx + 0x498], edi
mov esi, dword [ebx + 0x34]
movlpd qword [ebp - 0x284], xmm0
movlpd qword [ebp - 0x27c], xmm0
movups xmmword [ebp - 0x274], xmm0
test esi, esi
je 0x412f56
lea eax, [ebp - 0x284]
mov dword [0x456bd0], ebx
push eax
mov edx, esi
mov ecx, 0x456960
call fcn.00407650
add esp, 4
test eax, eax
jne 0x412f56
mov dword [0x456bd0], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00433516
add esp, 4
push eax
push esi
push str.Cannot_open__s:__s
push 0x456960
call fcn.004064e0
add esp, 0x10
jmp 0x412cd9
push dword [ebp - 0x248]
mov dword [0x456bd0], ebx
push str._s:_option_value_cannot_be_NULL
jmp 0x412ccc
mov ecx, ebx
call fcn.00410770
test eax, eax
je 0x412cd9
mov ecx, ebx
call fcn.0040fa20
test eax, eax
je 0x412cd9
mov edx, 0x7f000001
mov ecx, ebx
call fcn.00410150
cmp eax, 0xffffffff
je 0x412cd9
push dword [ebx + 0x54]
call fcn.0042e1a6
add esp, 4
cmp eax, 0x10000
jle 0x412fb8
push str.Too_many_worker_threads
push 0x456960
mov dword [0x456bd0], ebx
call fcn.004064e0
add esp, 8
jmp 0x412cd9
test eax, eax
jle 0x412ff4
push 4
push eax
mov dword [ebx + 0x474], eax
call fcn.004296e8
add esp, 8
mov dword [ebx + 0x478], eax
test eax, eax
jne 0x412ff4
push str.Not_enough_memory_for_worker_thread_ID_array
push 0x456960
mov dword [0x456bd0], ebx
call fcn.004064e0
add esp, 8
jmp 0x412cd9
mov eax, dword [ebx + 0xc0]
test eax, eax
je 0x413004
push ebx
call eax
add esp, 4
mov eax, dword [ebp - 0x264]
lea esi, [ebx + 0x470]
push 0
push 0
push ebx
push 0x412630
push 0
push 0
mov dword [ebx + 0xc8], eax
mov dword [ebx + 0xd0], 1
call fcn.0042b31d
add esp, 0x18
cmp eax, 0xffffffff
je 0x413041
test esi, esi
je 0x413041
mov dword [esi], eax
xor esi, esi
cmp dword [ebx + 0x474], esi
jbe 0x4130aa
nop dword [eax + eax]
push 0xffffffffffffffff
push dword [ebx + 0xe4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 0xe0]
push dword [ebx + 0xe4]
inc eax
mov dword [ebx + 0xe0], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebx + 0x478]
push 0
push 0
push ebx
push 0x411dd0
push 0
push 0
lea edi, [eax + esi*4]
call fcn.0042b31d
add esp, 0x18
cmp eax, 0xffffffff
je 0x4130cc
test edi, edi
je 0x4130cc
inc esi
mov dword [edi], eax
cmp esi, dword [ebx + 0x474]
jb 0x413050
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push dword [0x456c8c]
call eax
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423c62
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push dword [ebx + 0xe4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 0xe0]
push dword [ebx + 0xe4]
dec eax
mov dword [ebx + 0xe0], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [0x456bd0], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
test esi, esi
je 0x41311c
lea eax, [esi + 1]
push eax
push str.Cannot_start_worker_thread__i:_error__ld
push 0x456960
call fcn.004064e0
add esp, 0x10
jmp 0x4130aa
push str.Cannot_create_threads:_error__ld
jmp 0x412ccc