Function at 0x412650
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 [0x452004]
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.00428038
mov edi, eax
add esp, 8
mov dword [ebp - 0x25c], edi
test edi, edi
je 0x412b7f
xorps xmm0, xmm0
xorps xmm1, xmm1
movups xmmword [ebp - 0xa4], xmm0
movsd xmm0, qword [0x454918]
ucomisd xmm0, xmm1
movsd qword [ebp - 0x24c], xmm1
lahf
test ah, 0x44
jp 0x412717
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.004427e0
movsd xmm1, qword [0x44f7c8]
divsd xmm1, xmm0
ucomisd xmm1, qword [ebp - 0x24c]
movsd qword [0x454918], xmm1
lahf
test ah, 0x44
jnp 0x41277b
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.004427e0
mulsd xmm0, qword [0x454918]
movsd qword [ebp - 0x24c], xmm0
call fcn.00442730
mov ecx, eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], edx
call fcn.00442840
movsd xmm1, qword [ebp - 0x24c]
subsd xmm1, xmm0
mulsd xmm1, qword [0x44f7d8]
cvttsd2si eax, xmm1
mov dword [ebp - 0x9c], eax
mov eax, dword [0x454c60]
or eax, dword [0x454c64]
jne 0x412831
push eax
call fcn.00427b7f
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 0x4128a1
push 0x5851f42d
push 0x4c957f2d
push dword [0x454904]
push dword [0x454900]
call fcn.004420e0
add eax, 0xf767814f
mov dword [ebp - 0x250], eax
mov eax, dword [0x454c64]
adc edx, 0x14057b7e
mov dword [ebp - 0x254], edx
mov ecx, eax
mov edx, dword [0x454c60]
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 [0x454900], eax
mov eax, dword [ebp - 0x254]
mov dword [0x454904], eax
mov eax, ebx
xor eax, dword [ebp - 0x9c]
cdq
xor eax, ecx
mov dword [0x454c64], 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 [0x454c60], ecx
mov dword [edi + 0x48c], edx
lock xadd dword [0x45493c], eax
inc eax
mov ebx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp eax, esi
jne 0x412951
push 0x454924
call ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x454c6c], eax
cmp eax, 0xffffffff
jne 0x412959
lock dec dword [0x45493c]
push str.Cannot_initialize_thread_local_storage
push 0x454940
mov dword [0x454bb0], edi
call fcn.00406360
push edi
call fcn.00424740
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00422702
mov esp, ebp
pop ebp
ret
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x240], 0xffffffff
lock xadd dword [0x454910], esi
inc esi
lea eax, [ebp - 0x240]
mov dword [ebp - 0x23c], esi
push eax
push dword [0x454c6c]
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.00428038
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.00428038
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.00428038
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 0x412a93
push str.Cannot_initialize_thread_synchronization_objects
push 0x454940
mov dword [0x454bb0], ebx
call fcn.00406360
push ebx
call fcn.00424740
add esp, 0xc
jmp 0x412b70
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x412ad0
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 0x412c4d
mov edi, dword [eax]
add eax, 4
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x258], eax
test edi, edi
je 0x412c4d
mov eax, dword [str.cgi_pattern]
xor esi, esi
test eax, eax
je 0x412b50
mov ecx, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x412b38
test dl, dl
je 0x412b34
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x412b38
add eax, 2
add ecx, 2
test dl, dl
jne 0x412b18
xor eax, eax
jmp 0x412b3d
sbb eax, eax
or eax, 1
test eax, eax
je 0x412b92
inc esi
lea eax, [esi + esi*2]
mov eax, dword [eax*4 + 0x452c40]
test eax, eax
jne 0x412b16
push edi
mov dword [0x454bb0], ebx
push str.Invalid_option:__s
push 0x454940
call fcn.00406360
add esp, 0xc
mov ecx, ebx
call fcn.004124e0
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push dword [0x454c6c]
call eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00422702
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
je 0x412b50
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 0x412dd0
cmp dword [ebx + esi*4 + 8], 0
je 0x412be7
push dword [ebp - 0x248]
mov dword [0x454bb0], ebx
push str.warning:__s:_duplicate_option
push 0x454940
call fcn.00406360
add esp, 0xc
push dword [ebx + esi*4 + 8]
call fcn.00424740
add esp, 4
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x412bf0
sub ecx, edx
lea edi, [ecx + 1]
push edi
call fcn.0042475b
add esp, 4
mov dword [ebp - 0x248], eax
test eax, eax
je 0x412c3b
mov edx, dword [ebp - 0x260]
mov ecx, eax
cmp byte [edx], 0
je 0x412c38
sub edx, eax
nop
cmp edi, 1
jbe 0x412c32
mov al, byte [edx + ecx]
dec edi
mov byte [ecx], al
inc ecx
cmp byte [edx + ecx], 0
jne 0x412c20
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 0x412af2
xor edx, edx
mov dword [ebp - 0x248], edx
cmp dword [str.cgi_pattern], edx
je 0x412cea
lea ecx, [ebx + 8]
xor eax, eax
mov dword [ebp - 0x244], ecx
nop dword [eax]
cmp dword [ecx], 0
jne 0x412ccb
mov edi, dword [eax + 0x452c48]
test edi, edi
je 0x412ccb
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x412c84
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.0042475b
mov edx, eax
add esp, 4
test edx, edx
je 0x412cbd
cmp byte [edi], 0
mov ecx, edx
je 0x412cba
sub edi, edx
cmp esi, 1
jbe 0x412cba
mov al, byte [edi + ecx]
dec esi
mov byte [ecx], al
inc ecx
cmp byte [edi + ecx], 0
jne 0x412ca8
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 + 0x452c40], 0
jne 0x412c70
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.00405720
lea ecx, [ebp - 0x8c]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x412d18
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.0042475b
mov edi, eax
add esp, 4
test edi, edi
je 0x412d5b
cmp byte [ebp - 0x8c], 0
mov ecx, edi
je 0x412d58
lea edx, [ebp - 0x8c]
sub edx, edi
cmp esi, 1
jbe 0x412d58
mov al, byte [edx + ecx]
dec esi
mov byte [ecx], al
inc ecx
cmp byte [edx + ecx], 0
jne 0x412d46
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 0x412de6
lea eax, [ebp - 0x284]
mov dword [0x454bb0], ebx
push eax
mov edx, esi
mov ecx, 0x454940
call fcn.004074d0
add esp, 4
test eax, eax
jne 0x412de6
mov dword [0x454bb0], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00431e66
add esp, 4
push eax
push esi
push str.Cannot_open__s:__s
push 0x454940
call fcn.00406360
add esp, 0x10
jmp 0x412b69
push dword [ebp - 0x248]
mov dword [0x454bb0], ebx
push str._s:_option_value_cannot_be_NULL
jmp 0x412b5c
mov ecx, ebx
call fcn.00410600
test eax, eax
je 0x412b69
mov ecx, ebx
call fcn.0040f8b0
test eax, eax
je 0x412b69
mov edx, 0x7f000001
mov ecx, ebx
call fcn.0040ffe0
cmp eax, 0xffffffff
je 0x412b69
push dword [ebx + 0x54]
call fcn.0042caf6
add esp, 4
cmp eax, 0x10000
jle 0x412e48
push str.Too_many_worker_threads
push 0x454940
mov dword [0x454bb0], ebx
call fcn.00406360
add esp, 8
jmp 0x412b69
test eax, eax
jle 0x412e84
push 4
push eax
mov dword [ebx + 0x474], eax
call fcn.00428038
add esp, 8
mov dword [ebx + 0x478], eax
test eax, eax
jne 0x412e84
push str.Not_enough_memory_for_worker_thread_ID_array
push 0x454940
mov dword [0x454bb0], ebx
call fcn.00406360
add esp, 8
jmp 0x412b69
mov eax, dword [ebx + 0xc0]
test eax, eax
je 0x412e94
push ebx
call eax
add esp, 4
mov eax, dword [ebp - 0x264]
lea esi, [ebx + 0x470]
push 0
push 0
push ebx
push 0x4124c0
push 0
push 0
mov dword [ebx + 0xc8], eax
mov dword [ebx + 0xd0], 1
call fcn.00429c6d
add esp, 0x18
cmp eax, 0xffffffff
je 0x412ed1
test esi, esi
je 0x412ed1
mov dword [esi], eax
xor esi, esi
cmp dword [ebx + 0x474], esi
jbe 0x412f3a
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 0x411c60
push 0
push 0
lea edi, [eax + esi*4]
call fcn.00429c6d
add esp, 0x18
cmp eax, 0xffffffff
je 0x412f5c
test edi, edi
je 0x412f5c
inc esi
mov dword [edi], eax
cmp esi, dword [ebx + 0x474]
jb 0x412ee0
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push dword [0x454c6c]
call eax
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422702
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 [0x454bb0], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
test esi, esi
je 0x412fac
lea eax, [esi + 1]
push eax
push str.Cannot_start_worker_thread__i:_error__ld
push 0x454940
call fcn.00406360
add esp, 0x10
jmp 0x412f3a
push str.Cannot_create_threads:_error__ld
jmp 0x412b5c