Function at 0x434b80
Capabilities:
Allocate thread local storage
Check mutex on windows
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437136
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xec
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], esi
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov dword [ebp - 0x1c], eax
push 0x4423ec
push 0x4423e0
lea eax, [ebp - 0xf8]
push 0x40
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x14
lea ecx, [ebp - 0xf8]
mov word [ebp - 0x78], di
push ecx
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x18], ebx
je 0x434e31
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x434c0a
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edx, [ebp - 0x74]
push 0x1f
push edx
push 0x4423ec
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x434c60
mov word [ebp + eax*2 - 0x74], 0
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x30]
push eax
push ecx
lea edx, [ebp - 0x74]
push 0x4423d4
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x10
cmp eax, 2
jne 0x434c60
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x30]
cmp ecx, eax
jne 0x434c60
mov ecx, dword [ebp - 0x24]
mov dword [esi], ecx
jmp 0x434e01
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x434c7b
push 0x5c0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x34], esi
test esi, esi
je 0x434ce7
lea edx, [esi + 8]
mov dword [esi], 0
mov dword [esi + 4], 0xffffffff
mov ecx, 0x168
lea edi, [edx + 8]
xor eax, eax
mov dword [edx], 0
rep stosd dword es:[edi], eax
mov dword [edx + 0x5ac], edx
mov dword [edx + 0x5a8], edx
mov dword [edx + 0x5b0], edx
mov byte [ebp - 4], 2
mov dword [esi + 0x5bc], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x434ce3
lea edx, [ebp - 0x28]
push 0x43abc0
push edx
mov dword [ebp - 0x28], 2
call sub.MSVCRT.dll__CxxThrowException
mov dword [esi], ebx
jmp 0x434ce9
xor esi, esi
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0
test esi, esi
mov dword [eax], esi
jne 0x434d0b
lea ecx, [ebp - 0x20]
push 0x43abc0
push ecx
mov dword [ebp - 0x20], 1
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp - 0x1c]
push esi
push edx
lea eax, [ebp - 0x74]
push 0x4423d4
push eax
mov edi, 1
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0x10
lea ecx, [ebp - 0x74]
push ecx
push 0x4423ec
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x434dfe
lea edx, [ebp - 0x2c]
push 0x43abc0
push edx
mov dword [ebp - 0x2c], 3
call sub.MSVCRT.dll__CxxThrowException
push 0
push 0x4423ec
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov esi, dword [ebp - 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
test ebx, ebx
mov dword [ebp - 0x18], ebx
je 0x434df1
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x434d85
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov eax, dword [ebx]
test eax, eax
je 0x434d92
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebx + 0x5b0]
lea edi, [ebx + 8]
cmp esi, edi
je 0x434dc2
mov ebx, dword [esi + 0x5a8]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x434db9
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp ebx, edi
mov esi, ebx
jne 0x434d9f
mov ebx, dword [ebp - 0x18]
mov dword [edi + 0x5ac], edi
mov dword [edi + 0x5a8], edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x434de2
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x14]
mov eax, 0x434e2e
mov dword [ecx], 0
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x434e2e
ret
mov esi, dword [ebp - 0x14]
mov eax, dword [esi]
push ebx
inc dword [eax + 0x5bc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test edi, edi
jne 0x434e31
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret