Function at 0x401a80
Capabilities:
Create thread
Terminate thread

Disassembly:
mov eax, 0x1114
call fcn.00403380
push ebx
push esi
push edi
mov edi, dword [esp + 0x1124]
mov ax, word [edi]
cmp ax, 2
jne 0x401ab0
cmp word [edi + 6], 8
jne 0x401ab0
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1114
ret
mov cl, byte [0x40d210]
test cl, cl
je 0x401b1b
test ax, ax
jne 0x401b1b
mov ecx, dword [edi + 8]
xor eax, eax
mov ax, word [edi + 6]
lea edx, [esp + 0x10]
mov dword [esp + 0x11c], eax
push 0
push edx
mov edx, dword [0x42d424]
lea eax, [esp + 0x14]
mov dword [esp + 0x120], ecx
push 4
push eax
lea ecx, [esp + 0x24]
push 0x10c
push ecx
push 0x83400000
push edx
mov dword [esp + 0x134], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x401b51
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1114
ret
push 0
push 0
lea eax, [esp + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, dword [0x40d218]
xor ecx, ecx
mov cx, word [edi + 6]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x401b51
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1114
ret
mov eax, dword [0x40d20c]
mov ebx, dword [esp + 0x1128]
test eax, eax
je 0x401b7a
xor ecx, ecx
mov cl, byte [edi + 4]
cmp ecx, eax
je 0x401c30
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1114
ret
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x124]
push 0x1000
push eax
push 2
push ecx
call dword [0x42fe80]
test eax, eax
je 0x401bb4
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1114
ret
mov eax, dword [esp + 0x120]
xor esi, esi
push ebp
mov ebp, dword [esp + 0x1130]
test ax, ax
jbe 0x401bee
mov ecx, dword [esp + 0x128]
and eax, 0xffff
mov edx, ebp
mov edi, eax
mov esi, eax
mov al, byte [ecx]
add ecx, 2
mov byte [edx], al
inc edx
dec edi
jne 0x401bdc
mov edi, dword [esp + 0x1128]
and esi, 0xffff
push str.File
push ebp
mov byte [esi + ebp], 0
mov byte [ebx], 0
call fcn.00409500
add esp, 8
test eax, eax
pop ebp
je 0x401c25
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1114
ret
xor edx, edx
mov dl, byte [edi + 4]
mov dword [0x40d20c], edx
mov eax, dword [0x40d214]
xor esi, esi
cmp eax, esi
jne 0x401c50
push esi
push esi
push esi
push 0x401a10
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x40d214], eax
mov ecx, dword [0x42d418]
mov eax, dword [esp + 0xc]
push ecx
mov dword [0x42ee7c], eax
mov dword [0x42d428], ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [0x40d3f4]
push 0x64
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x401ca3
mov eax, dword [0x40d214]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x401c9d
push str.thread_not_deletable_n
call fcn.00403343
add esp, 4
mov dword [0x40d214], esi
mov ax, word [ebx]
mov ecx, dword [ebx + 4]
shr ax, 1
cmp ax, si
jbe 0x401cc7
and eax, 0xffff
mov edx, ebx
mov edi, eax
mov esi, eax
mov al, byte [ecx]
add ecx, 2
mov byte [edx], al
inc edx
dec edi
jne 0x401cbc
mov ecx, dword [esp + 0x1130]
mov edx, dword [esp + 0xc]
and esi, 0xffff
pop edi
mov al, 1
mov byte [esi + ebx], 0
pop esi
mov dword [ecx], edx
pop ebx
add esp, 0x1114
ret