Function at 0x10019d60
Capabilities:
Accept command line arguments
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006a54d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x10086014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
cmp eax, 1
jne 0x1001a0e4
mov edx, str.OriginEmuCmdArgs
lea ecx, [ebp - 0x44]
call fcn.100207b0
mov dword [ebp - 4], 0
cmp dword [ebp - 0x34], 0
je 0x10019dcd
sub esp, 0x18
lea eax, [ebp - 0x44]
mov ecx, esp
push eax
call fcn.1000de80
call fcn.10006370
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
mov dword [ebp - 0x2c], 0
mov ecx, edx
mov dword [ebp - 0x1c], 0
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10019df5
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.1000f820
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp - 0x2c]
mov ecx, esp
push eax
call fcn.1000de80
call fcn.10006370
add esp, 0x18
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
cmovae eax, dword [ebp - 0x2c]
push eax
push str.OriginEmuCmdArgs
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x10019e7d
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10019e73
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001a13d
push edx
push ecx
call fcn.1003c31e
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp edx, 8
jb 0x10019ed2
mov ecx, dword [ebp - 0x44]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10019ec8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001a13d
push edx
push ecx
call fcn.1003c31e
add esp, 8
push 0x1001a180
call fcn.1004733b
add esp, 4
cmp byte [0x1008949b], 0
jne 0x10019f9f
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_AttachConsole]
test eax, eax
jne 0x10019f6c
cmp byte [0x1008949a], al
je 0x10019f9f
call dword [sym.imp.KERNEL32.dll_AllocConsole]
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push 1
push 0x1f4
push 0x320
push 0x64
push 0x64
push eax
call dword [sym.imp.USER32.dll_MoveWindow]
push 0
call fcn.10049cca
push 0
mov esi, eax
call fcn.10049cca
push esi
push 0x1007a458
push str.conin_
push eax
call fcn.1004a105
push 1
call fcn.10049cca
push 1
mov esi, eax
call fcn.10049cca
push esi
push 0x1007a464
push str.conout_
push eax
call fcn.1004a105
add esp, 0x30
push 2
call fcn.10049cca
push 2
mov esi, eax
call fcn.10049cca
push esi
push 0x1007a464
push str.conout_
push eax
call fcn.1004a105
add esp, 0x18
mov edx, str.LSX_emu_version_1.5.3.0_n
mov ecx, 0x100884f8
call fcn.10011ab0
mov ecx, edi
mov dword [ebp - 4], 2
call fcn.10006490
mov dword [ebp - 4], 0xffffffff
call fcn.10018010
cmp dword [0x10089248], 0x10
mov eax, 0x10089234
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmovae eax, dword [0x10089234]
push eax
push str.ContentId
call esi
push 0x12
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x2c]
push str.INSTALLED_LANGUAGE
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
call fcn.1000fb90
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 4
push eax
mov ecx, 0x10089410
call fcn.1000c910
cmp dword [eax + 0x14], 0x10
jb 0x1001a01f
mov eax, dword [eax]
push eax
push str.EAGameLocale
call esi
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x18]
cmp edx, 0x10
jb 0x1001a095
mov ecx, dword [ebp - 0x2c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1001a08b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001a142
jmp 0x1001a08b
push edx
push ecx
call fcn.1003c31e
add esp, 8
push 0x10030860
lea ecx, [ebp - 0x4c]
call fcn.1001a190
mov ecx, eax
mov dword [ebp - 4], 5
call fcn.10019d10
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x48], 0
jne 0x1001a147
push 0x1002c570
lea ecx, [ebp - 0x58]
call fcn.1001a190
mov ecx, eax
mov dword [ebp - 4], 6
call fcn.10019d10
cmp dword [ebp - 0x54], 0
jne 0x1001a14c
jmp 0x1001a11a
test eax, eax
jne 0x1001a11a
mov ecx, dword [0x10089158]
test ecx, ecx
je 0x1001a100
mov eax, dword [ecx]
call dword [eax]
mov dword [0x10089158], 0
mov eax, dword [0x1008915c]
test eax, eax
je 0x1001a11a
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x1008915c], 0
mov eax, 1
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.1003c310
mov esp, ebp
pop ebp
ret 0xc
call fcn.100475cc
call fcn.100475cc
call fcn.1004735b
call fcn.1004735b
int3