Function at 0x40daea
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, 0x434a3e
call fcn.00433ea0
sub esp, 0x354
push ebx
lea eax, [ebp + 8]
xor ebx, ebx
push esi
test eax, eax
push edi
jne 0x40e215
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40db59
call esi
test eax, eax
je 0x40db46
cmp byte [ebp - 0xf], 0x3a
jne 0x40db46
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 0x40db70
call esi
test eax, eax
je 0x40db70
cmp byte [ebp - 0xf], 0x3a
jne 0x40db70
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40dbb2
call esi
test eax, eax
je 0x40db9f
cmp byte [ebp - 0xf], 0x3a
jne 0x40db9f
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 0x40dbc9
call esi
test eax, eax
je 0x40dbc9
cmp byte [ebp - 0xf], 0x3a
jne 0x40dbc9
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40dc0b
call esi
test eax, eax
je 0x40dbf8
cmp byte [ebp - 0xf], 0x3a
jne 0x40dbf8
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 0x40dc22
call esi
test eax, eax
je 0x40dc22
cmp byte [ebp - 0xf], 0x3a
jne 0x40dc22
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
lea eax, [ebp + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40dc62
call esi
test eax, eax
je 0x40dc4f
cmp byte [ebp - 0xf], 0x3a
jne 0x40dc4f
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 0x40dc79
call esi
test eax, eax
je 0x40dc79
cmp byte [ebp - 0xf], 0x3a
jne 0x40dc79
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40dcba
call esi
test eax, eax
je 0x40dca7
cmp byte [ebp - 0xf], 0x3a
jne 0x40dca7
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 0x40dcd1
call esi
test eax, eax
je 0x40dcd1
cmp byte [ebp - 0xf], 0x3a
jne 0x40dcd1
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40dd13
call esi
test eax, eax
je 0x40dd00
cmp byte [ebp - 0xf], 0x3a
jne 0x40dd00
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 0x40dd2a
call esi
test eax, eax
je 0x40dd2a
cmp byte [ebp - 0xf], 0x3a
jne 0x40dd2a
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40dd6d
call esi
test eax, eax
je 0x40dd5a
cmp byte [ebp - 0xf], 0x3a
jne 0x40dd5a
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 0x40dd84
call esi
test eax, eax
je 0x40dd84
cmp byte [ebp - 0xf], 0x3a
jne 0x40dd84
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40ddc7
call esi
test eax, eax
je 0x40ddb4
cmp byte [ebp - 0xf], 0x3a
jne 0x40ddb4
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 0x40ddde
call esi
test eax, eax
je 0x40ddde
cmp byte [ebp - 0xf], 0x3a
jne 0x40ddde
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40de1f
call esi
test eax, eax
je 0x40de0c
cmp byte [ebp - 0xf], 0x3a
jne 0x40de0c
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 0x40de36
call esi
test eax, eax
je 0x40de36
cmp byte [ebp - 0xf], 0x3a
jne 0x40de36
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40de96
call esi
test eax, eax
je 0x40de66
cmp byte [ebp - 0xf], 0x3a
jne 0x40de66
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 0x40de83
cmp byte [ebp - 0xf], 0x3a
jne 0x40de83
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 0x40dead
call esi
test eax, eax
je 0x40dead
cmp byte [ebp - 0xf], 0x3a
jne 0x40dead
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40df0d
call esi
test eax, eax
je 0x40dedd
cmp byte [ebp - 0xf], 0x3a
jne 0x40dedd
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 0x40defa
cmp byte [ebp - 0xf], 0x3a
jne 0x40defa
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 0x40df24
call esi
test eax, eax
je 0x40df24
cmp byte [ebp - 0xf], 0x3a
jne 0x40df24
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40df84
call esi
test eax, eax
je 0x40df54
cmp byte [ebp - 0xf], 0x3a
jne 0x40df54
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 0x40df71
cmp byte [ebp - 0xf], 0x3a
jne 0x40df71
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 0x40df9b
call esi
test eax, eax
je 0x40df9b
cmp byte [ebp - 0xf], 0x3a
jne 0x40df9b
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40dffb
call esi
test eax, eax
je 0x40dfcb
cmp byte [ebp - 0xf], 0x3a
jne 0x40dfcb
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 0x40dfe8
cmp byte [ebp - 0xf], 0x3a
jne 0x40dfe8
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 0x40e012
call esi
test eax, eax
je 0x40e012
cmp byte [ebp - 0xf], 0x3a
jne 0x40e012
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40e070
call esi
test eax, eax
je 0x40e040
cmp byte [ebp - 0xf], 0x3a
jne 0x40e040
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 0x40e05d
cmp byte [ebp - 0xf], 0x3a
jne 0x40e05d
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 0x40e087
call esi
test eax, eax
je 0x40e087
cmp byte [ebp - 0xf], 0x3a
jne 0x40e087
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40e0e8
call esi
test eax, eax
je 0x40e0b8
cmp byte [ebp - 0xf], 0x3a
jne 0x40e0b8
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 0x40e0d5
cmp byte [ebp - 0xf], 0x3a
jne 0x40e0d5
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 0x40e0ff
call esi
test eax, eax
je 0x40e0ff
cmp byte [ebp - 0xf], 0x3a
jne 0x40e0ff
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40e15e
call esi
test eax, eax
je 0x40e12e
cmp byte [ebp - 0xf], 0x3a
jne 0x40e12e
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 0x40e14b
cmp byte [ebp - 0xf], 0x3a
jne 0x40e14b
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 0x40e175
call esi
test eax, eax
je 0x40e175
cmp byte [ebp - 0xf], 0x3a
jne 0x40e175
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 + 8]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40e1fe
call esi
test eax, eax
je 0x40e1ce
cmp byte [ebp - 0xf], 0x3a
jne 0x40e1ce
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 0x40e1eb
cmp byte [ebp - 0xf], 0x3a
jne 0x40e1eb
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 0x40e215
call esi
test eax, eax
je 0x40e215
cmp byte [ebp - 0xf], 0x3a
jne 0x40e215
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push ebx
push 0x7d
push 0x34
pop edi
push edi
push 0x33
pop eax
push eax
push 0x36
push 0x31
push 0x43
push 0x38
push 0x35
push 0x44
push 0x39
push 0x36
push 0x42
push 0x37
push 0x2d
pop esi
push esi
push 0x46
push 0x46
push 0x42
push 0x41
push esi
push 0x66
push 0x36
push edi
push edi
push esi
push 0x32
push 0x38
push edi
push 0x39
push esi
push 0x41
push eax
push 0x46
push eax
push eax
push 0x44
push eax
push 0x38
lea eax, [ebp - 0xf4]
push 0x7b
push eax
call fcn.0040d32b
add esp, 0xa0
lea eax, [ebp - 0xf4]
push eax
mov eax, dword [0x43c3d0]
push ebx
push 0x1f0003
call dword [eax + 0x30]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x40e387
push eax
mov eax, dword [0x43c3d0]
call dword [eax + 0x48]
push dword [ebp - 0x18]
mov eax, dword [0x43c3d0]
call dword [eax + 0x44]
mov eax, dword [0x43c3d0]
push 0xbb8
call dword [eax + 0x3c]
lea eax, [ebp - 0x360]
push eax
mov eax, dword [0x43c3d0]
push 0x104
call dword [eax + 0x54]
push ebx
push 0x73
push 0x25
push 0x73
lea eax, [ebp - 0x90]
push 0x25
push eax
call fcn.0040d32b
add esp, 0x18
push ebx
push 0x74
push 0x61
push 0x64
push 0x2e
push 0x7d
push 0x43
pop eax
push eax
push 0x32
pop ecx
push ecx
push 0x37
push ecx
push eax
push ecx
push 0x45
push eax
push 0x31
push 0x44
push 0x35
push 0x31
push esi
push 0x30
push 0x31
push eax
push 0x41
push esi
push 0x65
push 0x64
push 0x63
push edi
push esi
push 0x38
push edi
push 0x45
push 0x45
push esi
push 0x41
push 0x39
push 0x46
push eax
push edi
push ecx
push 0x46
push 0x46
lea eax, [ebp - 0x158]
push 0x7b
push eax
call fcn.0040d32b
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x360]
push eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x25c]
push eax
mov eax, dword [0x43c3d0]
call dword [eax + 0x1dc]
add esp, 0xc0
lea eax, [ebp - 0x25c]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
mov eax, dword [0x43c3d0]
call dword [eax + 0x50]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40e38b
xor eax, eax
jmp 0x40e3e4
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x2c]
push 0x10
push eax
mov eax, dword [0x43c3d0]
push esi
call dword [eax + 0x4c]
mov eax, dword [0x43c3d0]
push esi
call dword [eax + 0x44]
push 0x58
call sub.MFC42.DLL_operatornew
pop ecx
mov ecx, eax
mov dword [ebp - 0x18], ecx
cmp ecx, ebx
mov dword [ebp - 4], ebx
je 0x40e3c7
lea eax, [ebp - 0x2c]
push eax
call fcn.0042122b
jmp 0x40e3c9
xor eax, eax
mov ecx, dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
mov dword [ecx], eax
lea eax, [ebp - 0x25c]
push eax
mov eax, dword [0x43c3d0]
call dword [eax + 0x40]
push 1
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4