Function at 0x404310
Capabilities:
Create process on windows
Create process suspended
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407520
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov ecx, 0x40c038
push eax
mov dword [0x40c008], 1
mov dword [0x40c004], 5
call fcn.004023e0
test al, al
jne 0x404382
push str.Couldnt_read_arguments.
call fcn.00401be0
add esp, 4
mov ecx, 0x40c038
call fcn.004028e0
or eax, 0xffffffff
jmp 0x404c56
cmp byte [0x40c04a], 0
je 0x40439c
mov ecx, 0x40c038
call fcn.004028e0
xor eax, eax
jmp 0x404c56
call fcn.00403e40
test al, al
je 0x404461
lea eax, [ebp - 0x5c]
push eax
call fcn.00404d40
mov eax, dword [ebp - 0x44]
add esp, 4
cmp eax, 1
jne 0x4043c4
mov ecx, str.New_Major_xOBSE_Release_available:_get_version__s_from_https:__github.com_llde_xOBSE_releases__n_Continue_to_load_the_game
jmp 0x4043da
cmp eax, 2
jne 0x4043d0
mov ecx, str.New_Minor_xOBSE_Release_available:_get_version__s_from_https:__github.com_llde_xOBSE_releases__n_Continue_to_load_the_game
jmp 0x4043da
cmp eax, 3
jne 0x40442b
mov ecx, str.New_Hotfix_xOBSE_Release_available:_get_version__s_from_https:__github.com_llde_xOBSE_releases.__n_Continue_to_load_the_game
cmp dword [ebp - 0x48], 0x10
lea eax, [ebp - 0x5c]
cmovae eax, dword [ebp - 0x5c]
push eax
push ecx
call fcn.00401c60
add esp, 8
cmp eax, 7
jne 0x40442b
mov edx, dword [ebp - 0x48]
cmp edx, 0x10
jb 0x404424
mov ecx, dword [ebp - 0x5c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40441a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404451
push edx
push ecx
call fcn.004064ec
add esp, 8
xor eax, eax
jmp 0x404c56
mov edx, dword [ebp - 0x48]
cmp edx, 0x10
jb 0x404461
mov ecx, dword [ebp - 0x5c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404457
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x404457
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004064ec
add esp, 8
mov cl, byte [0x40c038]
test cl, cl
je 0x40447e
push str.launching_editor
call fcn.00401210
mov cl, byte [0x40c038]
add esp, 4
cmp byte [0x40c039], 0
je 0x40449a
push str.loading_oldblivion
call fcn.00401210
mov cl, byte [0x40c038]
add esp, 4
xorps xmm0, xmm0
mov byte [ebp - 0xe1], 0
test cl, cl
movlpd qword [ebp - 0x140], xmm0
mov eax, str.Oblivion.exe
movlpd qword [ebp - 0x138], xmm0
mov esi, str.TESConstructionSet.exe
movlpd qword [ebp - 0x130], xmm0
cmove esi, eax
movlpd qword [ebp - 0x128], xmm0
mov eax, str.obse_editor
movlpd qword [ebp - 0x120], xmm0
mov edx, 0x4085c0
movlpd qword [ebp - 0x118], xmm0
cmove eax, edx
movlpd qword [ebp - 0x110], xmm0
cmp dword [0x40c060], 0
movlpd qword [ebp - 0x108], xmm0
movups xmmword [ebp - 0xfc], xmm0
mov dword [ebp - 0x144], 0x44
mov dword [ebp - 0xe8], esi
mov dword [ebp - 0xec], eax
je 0x40454d
cmp dword [0x40c064], 0x10
mov esi, 0x40c050
cmovae esi, dword [0x40c050]
push esi
push str.launching_alternate_exe___s_
mov dword [ebp - 0xe8], esi
call fcn.00401210
add esp, 8
cmp dword [0x40c078], 0
je 0x404584
cmp dword [0x40c07c], 0x10
mov edi, 0x40c068
cmovae edi, dword [0x40c068]
push edi
push str.launching_alternate_dll___s_
mov dword [ebp - 0xec], edi
call fcn.00401210
add esp, 8
mov byte [ebp - 0xe1], 1
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x80]
mov dword [ebp - 0x30], 0
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x2c], 0xf
push eax
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004012c0
add esp, 0xc
test al, al
jne 0x404602
push str.checksum_not_found
call fcn.00403af0
add esp, 4
cmp byte [0x40c04d], 0
je 0x4046d3
mov edi, dword [ebp - 0x2c]
cmp edi, 7
jb 0x404629
cmp edi, 0x10
mov dword [ebp - 0x30], 7
push 7
lea esi, [ebp - 0x40]
cmovae esi, dword [ebp - 0x40]
push str.1_2_416
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + 7], 0
add esp, 0xc
mov esi, dword [ebp - 0xe8]
cmp byte [ebp - 0x78], 0
je 0x404615
push str.Launching_Steam_version_of_Oblivion._This_method_isnt_tested_and_mayem_with_associated_evocation_of_the_saints_of_the_months_may_occur.
call fcn.00401210
add esp, 4
cmp byte [0x40c048], 0
je 0x4046db
xor esi, esi
jmp 0x404c1e
mov ecx, edi
mov eax, 0x7fffffff
shr ecx, 1
sub eax, ecx
cmp edi, eax
jbe 0x40463f
mov ecx, 0x7fffffff
jmp 0x40464c
lea eax, [edi + ecx]
mov ecx, 0xf
cmp eax, ecx
cmova ecx, eax
lea eax, [ecx + 1]
mov dword [ebp - 0xe8], ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00401fe0
mov ecx, dword [ebp - 0xe8]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [str.1_2_416]
mov dword [ebp - 0x30], 7
mov dword [eax], ecx
mov cx, word [0x409620]
mov word [eax + 4], cx
mov cl, byte [0x409622]
mov byte [eax + 6], cl
mov dword [ebp - 0x100], eax
mov byte [eax + 7], 0
cmp edi, 0x10
jb 0x4046cb
mov ecx, dword [ebp - 0x40]
inc edi
mov eax, ecx
cmp edi, 0x1000
jb 0x4046bb
mov ecx, dword [ecx - 4]
add edi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404c44
push edi
push ecx
call fcn.004064ec
mov eax, dword [ebp - 0x100]
add esp, 8
mov dword [ebp - 0x40], eax
jmp 0x404602
or esi, 0xffffffff
jmp 0x404c1e
mov dword [ebp - 0x28], 0
cmp byte [ebp - 0xe1], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 4], 0xffffffff
je 0x404713
push dword [ebp - 0xec]
lea ecx, [ebp - 0x28]
call fcn.00401db0
jmp 0x40489c
push 0x4086b4
push dword [ebp - 0xec]
lea eax, [ebp - 0x58]
push 0x4086b8
push eax
call fcn.00401ce0
add esp, 4
push eax
lea eax, [ebp - 0xe0]
push eax
call fcn.00403b10
add esp, 0xc
push eax
lea eax, [ebp - 0xc8]
push eax
call fcn.00403b10
add esp, 0xc
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.00403b10
add esp, 0xc
lea ecx, [ebp - 0x40]
cmp dword [ebp - 0x2c], 0x10
cmovae ecx, dword [ebp - 0x40]
push dword [ebp - 0x30]
push ecx
mov ecx, eax
call fcn.004041b0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x74], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x64], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x74]
push str..dll
push eax
lea eax, [ebp - 0x98]
mov dword [ebp - 4], 0xffffffff
push eax
call fcn.00403b10
mov edi, eax
add esp, 0xc
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x404820
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x4047ef
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4047e5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404851
push edx
push ecx
call fcn.004064ec
add esp, 8
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x18], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
mov dword [ebp - 4], 0xffffffff
nop dword [eax + eax]
lea ecx, [ebp - 0x98]
call fcn.00401de0
mov edx, dword [ebp - 0x60]
cmp edx, 0x10
jb 0x404861
mov ecx, dword [ebp - 0x74]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404857
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x404857
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004064ec
add esp, 8
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0xf
mov byte [ebp - 0x74], 0
call fcn.00401de0
lea ecx, [ebp - 0xc8]
call fcn.00401de0
lea ecx, [ebp - 0xe0]
call fcn.00401de0
lea ecx, [ebp - 0x58]
call fcn.00401de0
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push str.dll___s
call fcn.00401210
add esp, 8
lea ecx, [ebp - 0x16c]
call fcn.00405b50
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x16c]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.00405c10
test al, al
jne 0x404907
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push str.Couldnt_find_OBSE_DLL___s_._Please_make_sure_you_have_installed_OBSE_correctly_and_are_running_it_from_your_Oblivion_folder.
call fcn.00401be0
add esp, 8
lea ecx, [ebp - 0x16c]
call fcn.00405b80
or esi, 0xffffffff
jmp 0x404bdc
lea ecx, [ebp - 0x16c]
call fcn.00405b80
lea eax, [ebp - 0xfc]
push eax
lea eax, [ebp - 0x144]
push eax
push 0
push 0
push 4
push 1
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
setne cl
mov byte [ebp - 0xe1], cl
test eax, eax
jne 0x40496e
call esi
cmp eax, 0x2e4
jne 0x404968
push str.Vista_has_decided_that_launching_Oblivion_requires_UAC_privilege_elevation._There_is_no_good_reason_for_this_to_happen__but_to_fix_it__right_click_on_obse_loader.exe__go_to_Properties__pick_the_Compatibility_tab__then_turn_on__Run_this_program_as_an_administrator_.
call fcn.00401be0
add esp, 4
or esi, 0xffffffff
jmp 0x404bdc
mov cl, byte [ebp - 0xe1]
test cl, cl
jne 0x40498e
call esi
push 0
push eax
push str.Launching_Oblivion_failed
push 0x9f
push str.D:_axOBSExOBSEobseloadermain.cpp
call fcn.00405b00
add esp, 0x14
cmp byte [0x40c040], 0
je 0x4049ba
push dword [0x40c044]
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
test eax, eax
jne 0x4049ba
push str.couldnt_set_process_priority
call fcn.00404190
add esp, 4
cmp byte [0x40c038], 0
je 0x404a7a
cmp byte [0x40c04c], 0
je 0x404a3a
push str.using_old_editor_injection_method
call fcn.00401210
add esp, 4
push dword [ebp - 0xf8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x2710
push dword [ebp - 0xfc]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
cmp byte [0x40c049], 0
lea ecx, [ebp - 0x28]
sete al
cmp dword [ebp - 0x14], 0x10
push eax
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp - 0xfc]
push ecx
push eax
call fcn.00403db0
add esp, 0xc
test al, al
jne 0x404b67
push str.Couldnt_inject_dll.
call fcn.00401be0
add esp, 4
jmp 0x404b67
push str.using_new_editor_injection_method
call fcn.00401210
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x80]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
lea eax, [ebp - 0xfc]
push eax
call fcn.004037f0
add esp, 0x10
test al, al
jne 0x404b5b
push str.Couldnt_inject_dll.
call fcn.00401be0
jmp 0x404b58
cmp byte [0x40c049], 0
lea ecx, [ebp - 0x28]
sete al
cmp dword [ebp - 0x14], 0x10
push eax
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp - 0xfc]
push ecx
push eax
call fcn.00403db0
add esp, 0xc
test al, al
je 0x404b97
cmp byte [0x40c039], 0
je 0x404b4e
push str.OldblivionInjectionCompleted
push 0
push 0
push 0
mov byte [ebp - 0xe1], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edi, eax
test edi, edi
je 0x404b80
push 0
lea eax, [ebp - 0xfc]
push str.oldblivion.dll
push eax
call fcn.00403db0
add esp, 0xc
test al, al
je 0x404b31
push dword [0x40c03c]
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x404b1e
cmp eax, 0x80
je 0x404b17
cmp eax, 0x102
jne 0x404b3e
push str.LoadOldblivion:_waiting_for_oldblivion__WAIT_TIMEOUT
jmp 0x404b36
push str.LoadOldblivion:_waiting_for_oldblivion__WAIT_ABANDONED
jmp 0x404b36
push str.oldblivion_loaded
call fcn.00401210
mov byte [ebp - 0xe1], 1
jmp 0x404b3b
push str.couldnt_inject_oldblivion_dll
call fcn.00403af0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0xe1], 0
je 0x404b90
push str.launching_oblivion
call fcn.00401210
add esp, 4
push dword [ebp - 0xf8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp byte [0x40c04b], 0
je 0x404bc4
push 0xffffffffffffffff
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x404bc4
call esi
push eax
push str.couldnt_create_oldblivion_sync_event___d_
call fcn.00403af0
add esp, 8
mov eax, str.Couldnt_load_oldblivion.
jmp 0x404b9c
mov eax, str.Couldnt_inject_dll.
push eax
call fcn.00401be0
push str.terminating_oblivion_process
call fcn.00403af0
add esp, 8
push 0
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [0x40c04b], 0
push dword [ebp - 0xfc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xf8]
call esi
xor esi, esi
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x404c0c
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404c02
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404c44
push edx
push ecx
call fcn.004064ec
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x404c54
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404c4a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x404c4a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004064ec
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040674b
mov esp, ebp
pop ebp
ret 0x10