Function at 0x402170
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x41f008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push 0xff
push 0x4213e0
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
neg eax
push 0x3fe
sbb eax, eax
and eax, 0x4213e0
push esi
push 0x420fd8
mov dword [0x4214e0], eax
call fcn.004096dd
mov dl, byte [0x420fd8]
add esp, 0xc
mov ecx, 1
mov esi, 0x420fd8
mov dword [0x42036c], ecx
test dl, dl
je 0x402268
nop word [eax + eax]
mov eax, esi
cmp dl, 0x22
lea esi, [eax + 1]
cmovne esi, eax
xor eax, eax
mov dword [ecx*4 + 0x4214e0], esi
inc ecx
cmp dl, 0x22
mov dword [0x42036c], ecx
sete al
test eax, eax
jne 0x40220a
cmp byte [esi], 0x20
je 0x402228
cmp byte [esi], 0
jge 0x402210
inc esi
inc esi
test eax, eax
je 0x402220
cmp byte [esi], 0x22
jne 0x402220
mov byte [esi], 0
inc esi
xor eax, eax
mov cl, byte [esi]
test cl, cl
jne 0x402201
jmp 0x40222e
mov byte [esi], 0
inc esi
mov cl, byte [esi]
movsx ax, cl
movzx eax, ax
push eax
call fcn.004098ff
add esp, 4
test eax, eax
je 0x402258
movsx ax, byte [esi + 1]
inc esi
movzx eax, ax
push eax
call fcn.004098ff
add esp, 4
test eax, eax
jne 0x402242
mov dl, byte [esi]
mov ecx, dword [0x42036c]
test dl, dl
jne 0x4021e0
mov dword [ecx*4 + 0x4214e0], 0
cmp ecx, 5
jge 0x40228e
mov eax, 0xffffffeb
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402c53
mov esp, ebp
pop ebp
ret 0x10
push dword [0x4214e8]
call fcn.00409bdb
push dword [0x4214ec]
mov dword [ebp - 0x228], eax
call fcn.00409bdb
push dword [0x4214f0]
mov dword [0x4213d8], eax
call fcn.00409bdb
push 0x118
mov dword [0x4213dc], eax
call fcn.004030af
mov esi, eax
push 0x10e
push 0
lea ecx, [esi + 2]
push ecx
call fcn.00403d00
add esp, 0x1c
mov word [esi], 0x2e
cmp dword [0x42036c], 5
mov dword [esi + 0x110], 0
mov dword [esi + 0x114], 0
mov dword [0x420368], esi
jle 0x40231d
mov eax, dword [0x4214f8]
test eax, eax
je 0x40231d
push 0xf
push eax
push 0x10
push esi
call fcn.004061c7
add esp, 0x10
mov ecx, dword [0x4214e0]
lea edx, [ebp - 0x224]
sub edx, ecx
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x402330
push ebx
push edi
lea eax, [ebp - 0x224]
push 0x5c
push eax
call fcn.00404ab3
push dword [0x4214e4]
mov esi, eax
call fcn.00409bdb
mov edi, dword [0x420368]
mov ebx, eax
push esi
lea eax, [ebp - 0xa4]
push 0x80
push eax
call fcn.0040616d
lea eax, [ebp - 0xa4]
push 0x2e
push eax
call fcn.00404ab3
add esp, 0x20
test eax, eax
je 0x40238c
mov byte [eax], 0
cmp byte [ebp - 0xa4], 0x5c
lea eax, [ebp - 0xa4]
jne 0x4023a6
nop dword [eax + eax]
inc eax
cmp byte [eax], 0x5c
je 0x4023a0
push ebx
push eax
push edi
lea esi, [edi + 0x10]
push str._spipe_s__d
push esi
call fcn.00401200
add esp, 0x14
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x110], eax
cmp eax, 0xffffffff
jne 0x4023f4
mov dword [edi + 0x110], 0
mov dword [0x421520], 0
jmp 0x40240d
mov dword [0x421520], eax
test eax, eax
je 0x40240d
mov ecx, dword [0x420368]
push 0x41d25c
call fcn.004010e0
mov ecx, dword [0x4214f4]
lea edx, [ebp - 0x124]
mov esi, dword [0x4213d8]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x402421
lea eax, [ebp - 0x124]
push 0x5c
push eax
call fcn.00404ab3
push esi
push str.METL
push str._s_L_d.Dr4
mov byte [eax], 0
lea eax, [ebp - 0x24]
push eax
call fcn.00401770
lea edx, [ebp - 0x24]
add esp, 0x18
mov esi, edx
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x402460
lea edi, [ebp - 0x124]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402470
mov ecx, edx
lea eax, [ebp - 0x124]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00409912
add esp, 4
push dword [ebp - 0x228]
push ecx
push dword [0x4214f4]
push dword [0x4214e0]
call fcn.00401a30
cmp dword [0x421520], 0
mov edi, eax
je 0x4024c8
mov ecx, dword [0x420368]
push 0x41d260
call fcn.004010e0
test edi, edi
jle 0x4025d3
mov ebx, dword [0x41f8a0]
xorps xmm0, xmm0
push 0x420fc0
movups xmmword [0x420fb0], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor edi, edi
mov esi, 0x420374
lea ecx, [esi - 4]
mov dword [esi], ebx
lea eax, [edi + 1]
mov dword [esi + 0x304], 0x41f8a0
mov word [ecx], ax
xor eax, eax
mov word [esi - 2], ax
mov eax, dword [0x421524]
mov dword [esi + 0x308], eax
lea eax, [ebp - 0x228]
push eax
push 4
push ecx
push 0x401f50
push 0
push 0
call fcn.0040964c
add esp, 0x18
mov dword [ebp + edi*4 - 0x14], eax
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push dword [ebp + edi*4 - 0x14]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
add esi, 0x310
lea edi, [edi + 1]
cmp esi, 0x420fb4
jl 0x4024f2
push 0xffffffffffffffff
push 1
lea eax, [ebp - 0x14]
push eax
push 4
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push 0x420fc0
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
xor edi, edi
lea ebx, [ebp - 0x14]
mov esi, 0x420374
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, dword [esi]
lea ebx, [ebx + 4]
add esi, 0x310
cmp esi, 0x420fb4
jl 0x402580
mov eax, dword [0x421524]
mov ebx, eax
test ebx, ebx
je 0x4025d3
mov esi, dword [ebx + 0x14]
test esi, esi
je 0x4025cc
nop dword [eax]
cmp word [esi], 0
jne 0x4025c5
push esi
push ebx
push eax
call fcn.00401f90
add edi, eax
mov eax, dword [0x421524]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4025b0
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x4025a6
cmp dword [0x421520], 0
je 0x4025ec
mov ecx, dword [0x420368]
push 0x41d264
call fcn.004010e0
test edi, edi
js 0x402604
push ecx
push dword [0x4213d8]
push dword [0x4214f4]
call fcn.004017b0
mov edi, eax
cmp dword [0x421520], 0
je 0x40261d
mov ecx, dword [0x420368]
push 0x41d268
call fcn.004010e0
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x420368]
call fcn.00401170
mov esi, dword [0x420368]
cmp dword [esi + 0x110], 0
je 0x402652
mov ecx, esi
call fcn.00401170
push dword [esi + 0x110]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
lea eax, [edi + 0x3e8]
pop edi
pop ebx
mov dword [esi + 0x110], 0
xor ecx, ebp
pop esi
call fcn.00402c53
mov esp, ebp
pop ebp
ret 0x10