Function at 0x409e64
Capabilities:
Allocate thread local storage
Create directory
Get common file path
Read file on windows
Resume thread
Set current directory
Set environment variable
Set file attributes
Suspend thread

Disassembly:
mov eax, 0x434a28
call fcn.00433ea0
push ecx
push ecx
push ebx
lea eax, [ebp + 0x10]
xor ebx, ebx
push esi
test eax, eax
push edi
jne 0x40a58b
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x409ecf
call esi
test eax, eax
je 0x409ebc
cmp byte [ebp - 0xf], 0x3a
jne 0x409ebc
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x409ee6
call esi
test eax, eax
je 0x409ee6
cmp byte [ebp - 0xf], 0x3a
jne 0x409ee6
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x409f28
call esi
test eax, eax
je 0x409f15
cmp byte [ebp - 0xf], 0x3a
jne 0x409f15
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x409f3f
call esi
test eax, eax
je 0x409f3f
cmp byte [ebp - 0xf], 0x3a
jne 0x409f3f
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x409f81
call esi
test eax, eax
je 0x409f6e
cmp byte [ebp - 0xf], 0x3a
jne 0x409f6e
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x409f98
call esi
test eax, eax
je 0x409f98
cmp byte [ebp - 0xf], 0x3a
jne 0x409f98
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x409fd8
call esi
test eax, eax
je 0x409fc5
cmp byte [ebp - 0xf], 0x3a
jne 0x409fc5
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x409fef
call esi
test eax, eax
je 0x409fef
cmp byte [ebp - 0xf], 0x3a
jne 0x409fef
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetHandleCount]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a030
call esi
test eax, eax
je 0x40a01d
cmp byte [ebp - 0xf], 0x3a
jne 0x40a01d
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a047
call esi
test eax, eax
je 0x40a047
cmp byte [ebp - 0xf], 0x3a
jne 0x40a047
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a089
call esi
test eax, eax
je 0x40a076
cmp byte [ebp - 0xf], 0x3a
jne 0x40a076
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a0a0
call esi
test eax, eax
je 0x40a0a0
cmp byte [ebp - 0xf], 0x3a
jne 0x40a0a0
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a0e3
call esi
test eax, eax
je 0x40a0d0
cmp byte [ebp - 0xf], 0x3a
jne 0x40a0d0
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a0fa
call esi
test eax, eax
je 0x40a0fa
cmp byte [ebp - 0xf], 0x3a
jne 0x40a0fa
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a13d
call esi
test eax, eax
je 0x40a12a
cmp byte [ebp - 0xf], 0x3a
jne 0x40a12a
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a154
call esi
test eax, eax
je 0x40a154
cmp byte [ebp - 0xf], 0x3a
jne 0x40a154
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a195
call esi
test eax, eax
je 0x40a182
cmp byte [ebp - 0xf], 0x3a
jne 0x40a182
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a1ac
call esi
test eax, eax
je 0x40a1ac
cmp byte [ebp - 0xf], 0x3a
jne 0x40a1ac
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryExA]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a20c
call esi
test eax, eax
je 0x40a1dc
cmp byte [ebp - 0xf], 0x3a
jne 0x40a1dc
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a1f9
cmp byte [ebp - 0xf], 0x3a
jne 0x40a1f9
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a223
call esi
test eax, eax
je 0x40a223
cmp byte [ebp - 0xf], 0x3a
jne 0x40a223
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a283
call esi
test eax, eax
je 0x40a253
cmp byte [ebp - 0xf], 0x3a
jne 0x40a253
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a270
cmp byte [ebp - 0xf], 0x3a
jne 0x40a270
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a29a
call esi
test eax, eax
je 0x40a29a
cmp byte [ebp - 0xf], 0x3a
jne 0x40a29a
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenEventW]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a2fa
call esi
test eax, eax
je 0x40a2ca
cmp byte [ebp - 0xf], 0x3a
jne 0x40a2ca
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a2e7
cmp byte [ebp - 0xf], 0x3a
jne 0x40a2e7
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a311
call esi
test eax, eax
je 0x40a311
cmp byte [ebp - 0xf], 0x3a
jne 0x40a311
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
call dword [sym.imp.USER32.dll_SetWindowLongA]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a371
call esi
test eax, eax
je 0x40a341
cmp byte [ebp - 0xf], 0x3a
jne 0x40a341
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a35e
cmp byte [ebp - 0xf], 0x3a
jne 0x40a35e
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a388
call esi
test eax, eax
je 0x40a388
cmp byte [ebp - 0xf], 0x3a
jne 0x40a388
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a3e6
call esi
test eax, eax
je 0x40a3b6
cmp byte [ebp - 0xf], 0x3a
jne 0x40a3b6
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a3d3
cmp byte [ebp - 0xf], 0x3a
jne 0x40a3d3
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a3fd
call esi
test eax, eax
je 0x40a3fd
cmp byte [ebp - 0xf], 0x3a
jne 0x40a3fd
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a45e
call esi
test eax, eax
je 0x40a42e
cmp byte [ebp - 0xf], 0x3a
jne 0x40a42e
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a44b
cmp byte [ebp - 0xf], 0x3a
jne 0x40a44b
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a475
call esi
test eax, eax
je 0x40a475
cmp byte [ebp - 0xf], 0x3a
jne 0x40a475
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a4d4
call esi
test eax, eax
je 0x40a4a4
cmp byte [ebp - 0xf], 0x3a
jne 0x40a4a4
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a4c1
cmp byte [ebp - 0xf], 0x3a
jne 0x40a4c1
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a4eb
call esi
test eax, eax
je 0x40a4eb
cmp byte [ebp - 0xf], 0x3a
jne 0x40a4eb
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp + 0x10]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40a574
call esi
test eax, eax
je 0x40a544
cmp byte [ebp - 0xf], 0x3a
jne 0x40a544
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push 3
call esi
test eax, eax
je 0x40a561
cmp byte [ebp - 0xf], 0x3a
jne 0x40a561
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
mov byte [ebp - 0x14], 0x42
push eax
mov byte [ebp - 0x13], 0x3a
mov byte [ebp - 0x12], bl
call edi
jmp 0x40a58b
call esi
test eax, eax
je 0x40a58b
cmp byte [ebp - 0xf], 0x3a
jne 0x40a58b
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov esi, dword [ebp + 0x10]
push esi
call sub.MFC42.DLL_operatornew
push esi
mov edi, eax
push dword [ebp + 0xc]
push edi
call sub.MSVCRT.dll_memcpy
mov eax, dword [0x43c3d0]
add esp, 0x10
call dword [eax + 0x8c]
add esi, edi
mov dword [esi - 0x66], eax
add eax, 0xfffff843
mov dword [edi + 0xffc], eax
cmp dword [esi - 0x6a], ebx
jne 0x40a5e6
lea ecx, [ebp + 0xc]
call fcn.004200b8
push dword [ebp + 0x10]
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], ebx
push edi
call fcn.00420107
or dword [ebp - 4], 0xffffffff
mov dword [esi - 0x6a], eax
lea ecx, [ebp + 0xc]
jmp 0x40a60b
lea ecx, [ebp + 0xc]
call fcn.004200b8
push dword [esi - 0x6a]
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 1
push dword [ebp + 0x10]
push edi
call fcn.004201c3
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.004200e6
cmp dword [ebp + 0x18], ebx
push 2
pop esi
je 0x40a63e
lea ecx, [ebp + 0xc]
call fcn.0042029f
push dword [ebp + 0x18]
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 0x14]
push edi
call fcn.0042034d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.004202c4
mov eax, dword [0x43c3d0]
push ebx
push 0x80
push esi
push ebx
push 1
push 0x40000000
push dword [ebp + 8]
call dword [eax + 0x50]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a67a
lea eax, [ebp + 0x18]
push ebx
push eax
mov eax, dword [0x43c3d0]
push dword [ebp + 0x10]
push edi
push esi
call dword [eax + 0x78]
mov eax, dword [0x43c3d0]
push esi
call dword [eax + 0x44]
push edi
call fcn.00433e88
pop ecx
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14