Function at 0x781320d0
Capabilities:
Accept command line arguments
Get thread local storage value

Disassembly:
push 0x10
push 0x781b4b58
call fcn.78138a78
mov eax, dword [ebp + 0xc]
cmp eax, 1
jne 0x78132241
mov edi, 0x94
push edi
push 0
mov ebx, dword [sym.imp.kernel32.dll_GetProcessHeap]
call ebx
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x7813210c
xor eax, eax
jmp 0x78132314
mov dword [esi], edi
push esi
call dword [sym.imp.kernel32.dll_GetVersionExA]
push esi
test eax, eax
jne 0x78132126
push eax
call ebx
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
jmp 0x78132105
mov eax, dword [esi + 0x10]
mov dword [ebp + 0xc], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x20], eax
mov edi, dword [esi + 0xc]
and edi, 0x7fff
xor esi, esi
push esi
call ebx
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ebx, dword [ebp + 0xc]
cmp ebx, 2
je 0x7813215b
or edi, 0x8000
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
shl eax, 8
mov edx, dword [ebp - 0x20]
add eax, edx
mov dword [sym.MSVCR80.dll__osplatform], ebx
mov dword [sym.MSVCR80.dll__winver], eax
mov dword [sym.MSVCR80.dll__winmajor], ecx
mov dword [sym.MSVCR80.dll__winminor], edx
mov dword [sym.MSVCR80.dll__osver], edi
push 1
call fcn.781349c9
pop ecx
test eax, eax
je 0x78132105
call fcn.78132f3d
test eax, eax
jne 0x781321a8
call fcn.78134a2f
jmp 0x78132105
call fcn.78136b9f
test eax, eax
jge 0x781321b8
call fcn.78132c1b
jmp 0x7813219e
call fcn.7813aa7e
mov dword [0x781c3b28], eax
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [sym.MSVCR80.dll__acmdln], eax
call fcn.7813a9df
mov dword [sym.MSVCR80.dll__wcmdln], eax
call fcn.781377b4
call fcn.78132728
test eax, eax
jl 0x7813222c
push esi
call fcn.78131902
pop ecx
test eax, eax
jne 0x7813222c
mov ecx, dword [ebp + 8]
call fcn.78131d61
test eax, eax
jne 0x78132236
mov dword [ebp - 4], esi
push 0x22
call fcn.78131ab5
pop ecx
jmp 0x78132225
mov dword [ebp - 4], 0xfffffffe
call fcn.78136ddf
jmp 0x781321b1
inc dword [0x781c3b1c]
jmp 0x78132311
xor edi, edi
cmp eax, edi
jne 0x78132288
cmp dword [0x781c3b1c], edi
jle 0x78132105
dec dword [0x781c3b1c]
cmp dword [0x781c37fc], edi
jne 0x78132266
call sym.MSVCR80.dll__cexit
call fcn.78131a07
cmp dword [ebp + 0x10], edi
jne 0x78132311
call fcn.78136ddf
call fcn.78132c1b
call fcn.78134a2f
jmp 0x78132311
cmp eax, 2
jne 0x781322fe
call sym.MSVCR80.dll___set_flsgetvalue
push dword [0x781bf1f0]
push dword [0x781bf1f4]
call dword [sym.imp.kernel32.dll_TlsGetValue]
call eax
test eax, eax
jne 0x78132311
push 0x214
push 1
call sym.MSVCR80.dll__calloc_crt
pop ecx
pop ecx
mov esi, eax
cmp esi, edi
je 0x78132105
push esi
push dword [0x781bf1f0]
push dword [0x781c3d98]
call sym.MSVCR80.dll__decode_pointer
pop ecx
call eax
test eax, eax
je 0x781322f2
push edi
push esi
call sym.MSVCR80.dll__initptd
pop ecx
pop ecx
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
mov dword [esi], eax
or dword [esi + 4], 0xffffffff
jmp 0x78132311
push esi
call sym.MSVCR80.dll_free
pop ecx
jmp 0x78132105
cmp eax, 3
jne 0x7813230c
push edi
call fcn.78132ec8
pop ecx
jmp 0x78132311
call sub.msvcrt.dll__getdrives
xor eax, eax
inc eax
call fcn.78138abd
ret