Function at 0x403110
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a709
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x104
push ebx
push esi
push edi
lea edi, [ebp - 0x114]
mov ecx, 0x41
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x410028]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
movzx eax, byte [0x410124]
test eax, eax
je 0x40325a
push 1
push 0
push 2
lea ecx, [ebp - 0x20]
call fcn.00405ed0
mov dword [ebp - 4], 0
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp esi, esp
call fcn.00408b45
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00402ce0
add esp, 8
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x44]
call fcn.00405c80
mov byte [ebp - 4], 1
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00402e60
add esp, 0xc
push 1
push 0
lea ecx, [ebp - 0x44]
call fcn.00407ad0
push eax
call fcn.004029e0
add esp, 8
push eax
lea ecx, [ebp - 0x54]
call fcn.004056c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x54]
call fcn.00406720
push eax
mov edx, dword [ebp - 0x28]
push edx
push str.parent_process:__lu___s_
lea eax, [ebp - 0x90]
push eax
call fcn.00405710
add esp, 0x10
mov dword [ebp - 0xf4], eax
mov ecx, dword [ebp - 0xf4]
mov dword [ebp - 0xf8], ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0xf8]
call fcn.00406790
push eax
call fcn.004011e0
add esp, 4
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x90]
call fcn.00406200
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x54]
call fcn.004061c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.004063a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00406480
movzx edx, byte [0x410126]
test edx, edx
je 0x4032c8
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, esp
call fcn.00408b45
push eax
push str.main_thread__lu
lea eax, [ebp - 0x98]
push eax
call fcn.00405710
add esp, 0xc
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp - 0xfc]
mov dword [ebp - 0x100], ecx
mov dword [ebp - 4], 4
mov ecx, dword [ebp - 0x100]
call fcn.00406790
push eax
call fcn.004011e0
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x98]
call fcn.00406200
movzx edx, byte [0x410123]
test edx, edx
je 0x403395
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
cmp esi, esp
call fcn.00408b45
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x403310
push str.GetCommandLineW_failed
lea ecx, [ebp - 0xac]
call fcn.00405dc0
push 0x40e448
lea eax, [ebp - 0xac]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push 1
push 0
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.004029e0
add esp, 8
push eax
lea ecx, [ebp - 0x68]
call fcn.004056c0
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x68]
call fcn.00406720
push eax
push str.command_line:__s
lea edx, [ebp - 0xb4]
push edx
call fcn.00405710
add esp, 0xc
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0x104]
mov dword [ebp - 0x108], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x108]
call fcn.00406790
push eax
call fcn.004011e0
add esp, 4
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xb4]
call fcn.00406200
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x68]
call fcn.004061c0
movzx ecx, byte [0x410122]
test ecx, ecx
je 0x40351f
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp esi, esp
call fcn.00408b45
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x4033dd
push str.GetEnvironmentStringsW_failed
lea ecx, [ebp - 0xc8]
call fcn.00405dc0
push 0x40e448
lea edx, [ebp - 0xc8]
push edx
call sub.VCRUNTIME140.dll__CxxThrowException
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x74]
movzx edx, word [ecx]
test edx, edx
je 0x40348e
mov esi, esp
mov eax, dword [ebp - 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp esi, esp
call fcn.00408b45
add eax, 1
mov dword [ebp - 0x78], eax
push 0
mov ecx, dword [ebp - 0x74]
push ecx
call fcn.004029e0
add esp, 8
mov dword [ebp - 0x10c], eax
push 1
mov edx, dword [ebp - 0x10c]
push edx
lea ecx, [ebp - 0x84]
call fcn.004056c0
mov dword [ebp - 0x110], eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x74]
movzx ecx, word [eax]
cmp ecx, 0x3d
je 0x40346e
lea ecx, [ebp - 0x84]
call fcn.00406720
mov dword [ebp - 0x114], eax
mov edx, dword [ebp - 0x114]
push edx
call fcn.004011e0
add esp, 4
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x74]
lea edx, [ecx + eax*2]
mov dword [ebp - 0x74], edx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x84]
call fcn.004061c0
jmp 0x4033ea
jmp 0x4034d7
mov dword [ebp - 4], 0xffffffff
jmp 0x4034e7
mov esi, esp
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
cmp esi, esp
call fcn.00408b45
test eax, eax
jne 0x40351f
push str.FreeEnvironmentStringsW_failed
lea ecx, [ebp - 0xf0]
call fcn.00405dc0
push 0x40e448
lea eax, [ebp - 0xf0]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push edx
mov ecx, ebp
push eax
lea edx, [0x40355c]
call fcn.00408af1
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00408b74
add esp, 0x114
cmp ebp, esp
call fcn.00408b45
mov esp, ebp
pop ebp
ret