Function at 0x40777b
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, 0x4349ef
call fcn.00433ea0
sub esp, 0xbc
push ebx
lea eax, [ebp - 0x18]
xor ebx, ebx
push esi
test eax, eax
push edi
mov dword [ebp - 0x18], ecx
jne 0x407ea9
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x4077ed
call esi
test eax, eax
je 0x4077da
cmp byte [ebp - 0xf], 0x3a
jne 0x4077da
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 0x407804
call esi
test eax, eax
je 0x407804
cmp byte [ebp - 0xf], 0x3a
jne 0x407804
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407846
call esi
test eax, eax
je 0x407833
cmp byte [ebp - 0xf], 0x3a
jne 0x407833
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 0x40785d
call esi
test eax, eax
je 0x40785d
cmp byte [ebp - 0xf], 0x3a
jne 0x40785d
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40789f
call esi
test eax, eax
je 0x40788c
cmp byte [ebp - 0xf], 0x3a
jne 0x40788c
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 0x4078b6
call esi
test eax, eax
je 0x4078b6
cmp byte [ebp - 0xf], 0x3a
jne 0x4078b6
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
lea eax, [ebp - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x4078f6
call esi
test eax, eax
je 0x4078e3
cmp byte [ebp - 0xf], 0x3a
jne 0x4078e3
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 0x40790d
call esi
test eax, eax
je 0x40790d
cmp byte [ebp - 0xf], 0x3a
jne 0x40790d
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x40794e
call esi
test eax, eax
je 0x40793b
cmp byte [ebp - 0xf], 0x3a
jne 0x40793b
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 0x407965
call esi
test eax, eax
je 0x407965
cmp byte [ebp - 0xf], 0x3a
jne 0x407965
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x4079a7
call esi
test eax, eax
je 0x407994
cmp byte [ebp - 0xf], 0x3a
jne 0x407994
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 0x4079be
call esi
test eax, eax
je 0x4079be
cmp byte [ebp - 0xf], 0x3a
jne 0x4079be
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407a01
call esi
test eax, eax
je 0x4079ee
cmp byte [ebp - 0xf], 0x3a
jne 0x4079ee
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 0x407a18
call esi
test eax, eax
je 0x407a18
cmp byte [ebp - 0xf], 0x3a
jne 0x407a18
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407a5b
call esi
test eax, eax
je 0x407a48
cmp byte [ebp - 0xf], 0x3a
jne 0x407a48
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 0x407a72
call esi
test eax, eax
je 0x407a72
cmp byte [ebp - 0xf], 0x3a
jne 0x407a72
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407ab3
call esi
test eax, eax
je 0x407aa0
cmp byte [ebp - 0xf], 0x3a
jne 0x407aa0
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 0x407aca
call esi
test eax, eax
je 0x407aca
cmp byte [ebp - 0xf], 0x3a
jne 0x407aca
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407b2a
call esi
test eax, eax
je 0x407afa
cmp byte [ebp - 0xf], 0x3a
jne 0x407afa
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 0x407b17
cmp byte [ebp - 0xf], 0x3a
jne 0x407b17
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 0x407b41
call esi
test eax, eax
je 0x407b41
cmp byte [ebp - 0xf], 0x3a
jne 0x407b41
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407ba1
call esi
test eax, eax
je 0x407b71
cmp byte [ebp - 0xf], 0x3a
jne 0x407b71
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 0x407b8e
cmp byte [ebp - 0xf], 0x3a
jne 0x407b8e
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 0x407bb8
call esi
test eax, eax
je 0x407bb8
cmp byte [ebp - 0xf], 0x3a
jne 0x407bb8
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407c18
call esi
test eax, eax
je 0x407be8
cmp byte [ebp - 0xf], 0x3a
jne 0x407be8
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 0x407c05
cmp byte [ebp - 0xf], 0x3a
jne 0x407c05
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 0x407c2f
call esi
test eax, eax
je 0x407c2f
cmp byte [ebp - 0xf], 0x3a
jne 0x407c2f
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407c8f
call esi
test eax, eax
je 0x407c5f
cmp byte [ebp - 0xf], 0x3a
jne 0x407c5f
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 0x407c7c
cmp byte [ebp - 0xf], 0x3a
jne 0x407c7c
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 0x407ca6
call esi
test eax, eax
je 0x407ca6
cmp byte [ebp - 0xf], 0x3a
jne 0x407ca6
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407d04
call esi
test eax, eax
je 0x407cd4
cmp byte [ebp - 0xf], 0x3a
jne 0x407cd4
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 0x407cf1
cmp byte [ebp - 0xf], 0x3a
jne 0x407cf1
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 0x407d1b
call esi
test eax, eax
je 0x407d1b
cmp byte [ebp - 0xf], 0x3a
jne 0x407d1b
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407d7c
call esi
test eax, eax
je 0x407d4c
cmp byte [ebp - 0xf], 0x3a
jne 0x407d4c
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 0x407d69
cmp byte [ebp - 0xf], 0x3a
jne 0x407d69
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 0x407d93
call esi
test eax, eax
je 0x407d93
cmp byte [ebp - 0xf], 0x3a
jne 0x407d93
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407df2
call esi
test eax, eax
je 0x407dc2
cmp byte [ebp - 0xf], 0x3a
jne 0x407dc2
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 0x407ddf
cmp byte [ebp - 0xf], 0x3a
jne 0x407ddf
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 0x407e09
call esi
test eax, eax
je 0x407e09
cmp byte [ebp - 0xf], 0x3a
jne 0x407e09
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 - 0x18]
cmp eax, 0x4db
lea eax, [ebp - 0x10]
push eax
push 3
jne 0x407e92
call esi
test eax, eax
je 0x407e62
cmp byte [ebp - 0xf], 0x3a
jne 0x407e62
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 0x407e7f
cmp byte [ebp - 0xf], 0x3a
jne 0x407e7f
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 0x407ea9
call esi
test eax, eax
je 0x407ea9
cmp byte [ebp - 0xf], 0x3a
jne 0x407ea9
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov esi, dword [ebp - 0x18]
mov edi, 0x400
push 0x5e
push edi
push dword [esi + 0x10c]
lea ecx, [ebp - 0xc8]
push dword [esi + 0x108]
call fcn.00421327
push 0x5e
push edi
push dword [esi + 0x114]
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], ebx
push dword [esi + 0x110]
call fcn.00421327
lea eax, [ebp - 0x70]
lea ecx, [ebp - 0xc8]
push eax
mov byte [ebp - 4], 1
call fcn.004213e6
test eax, eax
je 0x407f01
push 1
pop esi
jmp 0x407f03
xor esi, esi
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], bl
call fcn.004213d8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc8]
call fcn.004213d8
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret