Function at 0x1007405
Capabilities:
Allocate thread local storage
Check mutex on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x750
mov eax, dword [0x100e03c]
and dword [ebp - 0x74c], 0
push ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
mov dword [ebp - 0x744], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x748], eax
mov edi, esi
je 0x100758b
mov eax, dword [edi + 0x630]
cmp eax, 4
je 0x10072f0
cmp eax, 5
jne 0x1007306
push ebx
push esi
push edi
push dword [ebp - 0x748]
push dword [ebp - 0x744]
call fcn.01006a1e
jmp 0x100731f
cmp eax, 7
jne 0x100732d
push ebx
push esi
push edi
push dword [ebp - 0x748]
push dword [ebp - 0x744]
call fcn.01006cae
test eax, eax
mov dword [ebp - 0x74c], eax
jl 0x100758b
mov edi, dword [edi + 0x648]
test edi, edi
jne 0x10072e0
test esi, esi
je 0x100758b
mov ebx, 0xff
cmp dword [esi + 0x610], 1
jne 0x100757d
cmp dword [esi + 0x63c], 0
jne 0x100757d
mov eax, dword [esi + 0x630]
test eax, eax
jne 0x100756b
and dword [ebp - 0x740], eax
mov ecx, 0x8e
lea edi, [ebp - 0x73c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x529]
push eax
push ebx
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.01006278
cmp dword [ebp - 0x529], 0xffffffff
jne 0x100747d
lea eax, [ebp - 0x104]
push 0x1002028
push eax
call fcn.01008c30
test eax, eax
pop ecx
pop ecx
je 0x100747d
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push ebx
lea eax, [ebp - 0x204]
push eax
push 0x3f1
push dword [0x100e2c8]
call edi
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.01008c30
test eax, eax
pop ecx
pop ecx
push ebx
je 0x10073ff
lea eax, [ebp - 0x104]
push eax
push 0x3ef
jmp 0x1007475
lea eax, [ebp - 0x204]
push eax
push 0x3f2
push dword [0x100e2c8]
call edi
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.01008c30
test eax, eax
pop ecx
pop ecx
push ebx
je 0x100743b
lea eax, [ebp - 0x104]
push eax
push 0x3f0
jmp 0x1007475
lea eax, [ebp - 0x204]
push eax
push 0x1389
push dword [0x100e2c8]
call edi
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.01008c30
test eax, eax
pop ecx
pop ecx
je 0x100747d
push ebx
lea eax, [ebp - 0x104]
push eax
push 0x3ee
push dword [0x100e2c8]
call edi
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x304]
push eax
lea eax, [ebp - 0x504]
push eax
lea eax, [ebp - 0x750]
push eax
lea eax, [esi + 0x208]
push eax
call fcn.01008a64
lea eax, [ebp - 0x304]
push eax
push reloc.KERNEL32.dll_FreeEnvironmentStringsW
lea eax, [ebp - 0x639]
push 0x104
push eax
call fcn.0100bc14
lea eax, [esi + 0x510]
add esp, 0x24
cmp byte [eax], 0
jne 0x10074e5
cmp byte [ebp - 0x104], 0
lea eax, [ebp - 0x104]
jne 0x10074e5
lea eax, [ebp - 0x304]
push 0x103
push eax
lea eax, [ebp - 0x73c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [esi + 0x644]
mov dword [ebp - 0x521], eax
mov eax, dword [esi + 0x640]
mov dword [ebp - 0x51d], eax
lea eax, [ebp - 0x740]
push eax
xor eax, eax
push eax
push eax
push 1
push eax
push eax
lea eax, [ebp - 0x740]
push eax
push dword [ebp - 0x748]
push dword [ebp - 0x744]
call fcn.01006596
xor eax, eax
mov al, byte [ebp - 0x529]
inc al
cmp dword [ebp - 0x529], 0xffffffff
push esi
sete cl
dec cl
and ecx, eax
push ecx
lea eax, [ebp - 0x73c]
push eax
push dword [ebp - 0x740]
push dword [ebp - 0x744]
call fcn.0100634a
jmp 0x100757d
cmp eax, 3
je 0x100757d
lea eax, [esi + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [esi + 0x648]
test esi, esi
jne 0x1007344
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x74c]
pop edi
pop esi
pop ebx
call fcn.010086b7
leave
ret 0x10