Function at 0x10076dec
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], ebx
mov edi, dword [ebp + 0x18]
mov eax, dword [0x100d910c]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x10077438
mov eax, edi
and eax, 8
mov dword [ebp - 4], eax
je 0x10076e70
mov eax, edi
shr eax, 5
and eax, 3
je 0x1007703c
cmp eax, 1
je 0x10076e68
cmp eax, 2
jne 0x10076e3f
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
jmp 0x10076e70
cmp eax, 3
jne 0x10076e50
mov edx, dword [ebp + 0x14]
xor eax, eax
mov dword [edx], eax
mov dword [edx + 4], eax
jmp 0x10076e70
push 0x425
push str.for_aio.c
push 2
push 8
call fcn.100149ac
add esp, 0x10
jmp 0x10076e70
mov edx, dword [ebp + 0x14]
xor eax, eax
mov word [edx], ax
mov eax, dword [ebp + 0xc]
cmp eax, 0xfffffffb
jge 0x10076f86
mov dword [ebp - 0x14], 0x20
test edi, 9
je 0x10076f69
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10076ef3
mov eax, dword [ebp - 4]
test eax, eax
je 0x10076ef3
mov eax, edi
shr eax, 5
and eax, 3
je 0x10077047
cmp eax, 1
je 0x10076eea
cmp eax, 2
jne 0x10076ebf
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
jmp 0x10076ef3
cmp eax, 3
jne 0x10076ed2
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x14]
cdq
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x10076ef3
push 0x484
push str.for_aio.c
push 2
push 8
call fcn.100149ac
add esp, 0x10
jmp 0x10076ef3
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 0x14]
mov word [edx], ax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10076f5a
cmp eax, 0xffffffff
jne 0x10076f24
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
test edi, 2
mov edi, dword [ebp - 0x10]
mov eax, 2
jne 0x10076f20
mov eax, 0
mov esp, ebp
pop ebp
ret
cmp eax, 0xfffffffe
jne 0x10076f48
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
test edi, 4
mov edi, dword [ebp - 0x10]
mov eax, 3
jne 0x10076f44
mov eax, 0
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
and edi, 1
mov eax, edi
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x30], 0
push 0x100b600c
mov eax, dword [ebp + 0xc]
push eax
push 2
push dword [ebp - 0x14]
call fcn.100149ac
add esp, 0x10
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0xc]
lea ebx, [eax + 5]
and ebx, 0x7f
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebx*4 + 0x100d9e00]
test esi, esi
je 0x10076fb8
cmp edi, dword [esi + 0x20]
je 0x10077423
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x10076fa8
mov eax, dword [0x100d9148]
test eax, eax
je 0x10076fe2
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x100d9148]
je 0x10076fe2
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
call dword [sym.imp.KERNEL32.dll_ExitThread]
xor esi, esi
test esi, esi
je 0x100773e3
mov eax, dword [esi + 0x18]
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [esi + 0x18]
cmp eax, dword [edx + 0xc]
je 0x100773ad
movsx eax, byte [edx + 0x38]
cmp eax, 9
jne 0x10077055
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x18]
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10076f92
mov eax, dword [ebp + 0x14]
mov byte [eax], 0
jmp 0x10076e70
movzx eax, byte [ebp - 0x14]
mov edx, dword [ebp + 0x14]
mov byte [edx], al
jmp 0x10076ef3
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x100773a2
je 0x100773a2
movsx ecx, byte [eax + 0x10]
cmp ecx, 9
je 0x1007737a
mov eax, dword [eax]
test eax, eax
jne 0x10077066
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x2c], edx
mov eax, edx
mov ecx, dword [eax]
test ecx, ecx
je 0x100772e0
mov eax, dword [eax + 4]
test eax, eax
jle 0x100772d9
xor ebx, ebx
mov dword [ebp - 0x30], ebx
mov edi, ebx
movzx edx, byte [edi + ecx + 0x10]
test dl, 1
je 0x100770b1
add edi, 0x14
add ebx, 1
cmp ebx, eax
jl 0x1007709d
mov edi, dword [ebp + 0x18]
cmp ebx, eax
jne 0x1007713f
mov ecx, dword [ebp - 0x2c]
lea eax, [eax + eax*4]
mov edx, eax
shl edx, 2
lea eax, [eax*4 + 0x50]
push edx
push ecx
push eax
call fcn.10049694
add esp, 0xc
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10077294
mov edx, dword [esi + 0x18]
add dword [edx + 4], 4
mov ecx, dword [esi + 0x18]
mov ecx, dword [ecx]
lea eax, [ebx + ebx*4]
mov edx, eax
shl edx, 2
lea ecx, [ecx + eax*4]
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], eax
mov dword [ecx + 0x20], eax
mov dword [ecx + 0x24], eax
mov dword [ecx + 0x28], eax
mov dword [ecx + 0x2c], eax
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x34], eax
mov dword [ecx + 0x38], eax
mov dword [ecx + 0x3c], eax
mov dword [ecx + 0x40], eax
mov dword [ecx + 0x44], eax
mov dword [ecx + 0x48], eax
mov dword [ecx + 0x4c], eax
mov eax, dword [esi + 0x18]
mov ecx, dword [eax]
jmp 0x10077145
lea edx, [ebx + ebx*4]
shl edx, 2
add ecx, edx
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov eax, dword [esi + 0x18]
mov ecx, dword [eax]
or byte [ecx + edx + 0x10], 1
test edi, 0x10
je 0x100771bb
mov eax, edi
shr eax, 7
and eax, 3
je 0x1007728a
cmp eax, 1
je 0x100771b5
cmp eax, 2
jne 0x10077188
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
jmp 0x100771bb
cmp eax, 3
jne 0x1007719d
mov ecx, dword [ebp + 0x10]
mov eax, ebx
cdq
mov eax, dword [ebp + 0x10]
mov dword [ecx], ebx
mov dword [eax + 4], edx
jmp 0x100771bb
push 0x470
push str.for_aio.c
push 2
push 8
call fcn.100149ac
add esp, 0x10
jmp 0x100771bb
mov eax, dword [ebp + 0x10]
mov word [eax], bx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], esi
push 0x100d9110
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x18]
mov dword [0x100d914c], esi
lea edx, [ebp - 0x30]
xor ecx, ecx
add eax, 0xc
push eax
push ecx
push edx
push 0x1007699c
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [esi + 0x18]
mov dword [edx + 8], eax
test eax, eax
je 0x100772c0
xor eax, eax
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x100d9110
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [esi + 0x18]
mov dword [edx + 0x28], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0xffffffffffffffff
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10076e8f
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov dword [esp + 0xc], ebx
mov eax, esi
mov edx, 0xfffffffe
mov dword [esp + 0x10], ecx
mov ecx, edi
call fcn.10077eac
jmp 0x10076e8f
mov eax, dword [ebp + 0x10]
mov byte [eax], bl
jmp 0x100771bb
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov dword [esp + 0xc], ebx
mov eax, esi
mov edx, 0xfffffffe
mov dword [esp + 0x10], ecx
mov ecx, edi
call fcn.10077eac
jmp 0x10076e8f
push 0x100d9110
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
jmp 0x10077248
xor ebx, ebx
jmp 0x100770b4
push eax
push 0
push 0x50
call fcn.1004970c
add esp, 0xc
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x1007734e
mov eax, dword [esi + 0x18]
mov dword [eax + 4], 4
mov edx, dword [esi + 0x18]
mov ebx, dword [edx]
xor ecx, ecx
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], ecx
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x18], ecx
mov dword [ebx + 0x1c], ecx
mov dword [ebx + 0x20], ecx
mov dword [ebx + 0x24], ecx
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], ecx
mov dword [ebx + 0x30], ecx
mov dword [ebx + 0x34], ecx
mov dword [ebx + 0x38], ecx
mov dword [ebx + 0x3c], ecx
mov dword [ebx + 0x40], ecx
mov dword [ebx + 0x44], ecx
mov dword [ebx + 0x48], ecx
mov dword [ebx + 0x4c], ecx
mov eax, dword [esi + 0x18]
mov ecx, dword [eax]
xor ebx, ebx
xor edx, edx
jmp 0x10077145
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov dword [esp + 0xc], ebx
mov eax, esi
mov edx, 0xfffffffe
mov dword [esp + 0x10], ecx
mov ecx, edi
call fcn.10077eac
jmp 0x10076e8f
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x18]
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10076f92
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x2c], edx
jmp 0x1007707f
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x14], 0x28
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov dword [esp + 0xc], ebx
mov eax, esi
mov edx, 0xfffffffe
mov dword [esp + 0x10], ecx
mov ecx, edi
call fcn.10077eac
jmp 0x10076e8f
mov dword [ebp - 0x14], 0x65
push 0x100d9128
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 0x18]
test al, 9
jne 0x1007741b
mov dword [ebp - 0x30], 0
push 0x100b600c
push edi
push 2
push dword [ebp - 0x14]
call fcn.100149ac
add esp, 0x10
jmp 0x10076fec
mov edi, dword [ebp + 0x18]
jmp 0x10076e8f
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x10076fe4
mov esi, 0
jmp 0x10076fe4
call fcn.10077e4c
jmp 0x10076e12