Function at 0x404320
Capabilities:
Create process on windows
Create process suspended
Resume thread
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407680
mov eax, dword fs:[0]
push eax
sub esp, 0x1e0
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.004023f0
test al, al
jne 0x404392
push str.Couldnt_read_arguments.
call fcn.00401bf0
add esp, 4
mov ecx, 0x40c038
call fcn.004028f0
or eax, 0xffffffff
jmp 0x404db6
cmp byte [0x40c04a], 0
je 0x4043ac
mov ecx, 0x40c038
call fcn.004028f0
xor eax, eax
jmp 0x404db6
call fcn.00403e50
test al, al
je 0x40448c
lea eax, [ebp - 0xdc]
push eax
call fcn.00404ed0
mov eax, dword [ebp - 0xc4]
add esp, 4
cmp eax, 1
jne 0x4043da
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 0x4043f0
cmp eax, 2
jne 0x4043e6
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 0x4043f0
cmp eax, 3
jne 0x404450
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 - 0xc8], 0x10
lea eax, [ebp - 0xdc]
cmovae eax, dword [ebp - 0xdc]
push eax
push ecx
call fcn.00401c70
add esp, 8
cmp eax, 7
jne 0x404450
mov edx, dword [ebp - 0xc8]
cmp edx, 0x10
jb 0x404449
mov ecx, dword [ebp - 0xdc]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40443f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40447c
push edx
push ecx
call fcn.0040664c
add esp, 8
xor eax, eax
jmp 0x404db6
mov edx, dword [ebp - 0xc8]
cmp edx, 0x10
jb 0x40448c
mov ecx, dword [ebp - 0xdc]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404482
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x404482
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040664c
add esp, 8
mov cl, byte [0x40c038]
test cl, cl
je 0x4044a9
push str.launching_editor
call fcn.00401210
mov cl, byte [0x40c038]
add esp, 4
cmp byte [0x40c039], 0
je 0x4044c5
push str.loading_oldblivion
call fcn.00401210
mov cl, byte [0x40c038]
add esp, 4
xorps xmm0, xmm0
mov byte [ebp - 0x161], 0
test cl, cl
movlpd qword [ebp - 0x1c0], xmm0
mov eax, str.Oblivion.exe
movlpd qword [ebp - 0x1b8], xmm0
mov esi, str.TESConstructionSet.exe
movlpd qword [ebp - 0x1b0], xmm0
cmove esi, eax
movlpd qword [ebp - 0x1a8], xmm0
mov eax, str.obse_editor
movlpd qword [ebp - 0x1a0], xmm0
mov edx, 0x4085c0
movlpd qword [ebp - 0x198], xmm0
cmove eax, edx
movlpd qword [ebp - 0x190], xmm0
cmp dword [0x40c064], 0
movlpd qword [ebp - 0x188], xmm0
movups xmmword [ebp - 0x17c], xmm0
mov dword [ebp - 0x1c4], 0x44
mov dword [ebp - 0x168], esi
mov dword [ebp - 0x16c], eax
je 0x404578
cmp dword [0x40c068], 0x10
mov esi, 0x40c054
cmovae esi, dword [0x40c054]
push esi
push str.launching_alternate_exe___s_
mov dword [ebp - 0x168], esi
call fcn.00401210
add esp, 8
cmp dword [0x40c07c], 0
je 0x4045af
cmp dword [0x40c080], 0x10
mov edi, 0x40c06c
cmovae edi, dword [0x40c06c]
push edi
push str.launching_alternate_dll___s_
mov dword [ebp - 0x16c], edi
call fcn.00401210
add esp, 8
mov byte [ebp - 0x161], 1
mov dword [ebp - 0xc0], 0
lea eax, [ebp - 0x100]
mov dword [ebp - 0xb0], 0
push eax
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xac], 0xf
push eax
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004012c0
add esp, 0xc
test al, al
jne 0x40464c
push str.checksum_not_found
call fcn.00403b00
add esp, 4
cmp byte [0x40c04d], 0
je 0x4047a8
mov edi, dword [ebp - 0xac]
cmp edi, 7
jb 0x4046ef
cmp edi, 0x10
mov dword [ebp - 0xb0], 7
push 7
lea esi, [ebp - 0xc0]
cmovae esi, dword [ebp - 0xc0]
push str.1_2_416
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + 7], 0
add esp, 0xc
mov esi, dword [ebp - 0x168]
cmp byte [ebp - 0xf8], 0
je 0x4046db
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
mov eax, dword [0x40c050]
add esp, 4
mov ecx, 0x573a
test eax, eax
je 0x404688
push eax
push str.using_alternate_appid__d
call fcn.00401210
mov ecx, dword [0x40c050]
add esp, 8
push ecx
push 0x4086c8
lea eax, [ebp - 0x90]
push 0x80
push eax
call fcn.00404de0
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0x90]
add esp, 0x10
push eax
push str.SteamGameId
call edi
lea eax, [ebp - 0x90]
push eax
push str.SteamAppID
call edi
cmp byte [0x40c04e], 0
je 0x4046db
lea eax, [ebp - 0x90]
push eax
push str.SteamAppID
call edi
cmp byte [0x40c048], 0
je 0x4047b0
xor esi, esi
jmp 0x404d78
mov ecx, edi
mov eax, 0x7fffffff
shr ecx, 1
sub eax, ecx
cmp edi, eax
jbe 0x404705
mov ecx, 0x7fffffff
jmp 0x404712
lea eax, [edi + ecx]
mov ecx, 0xf
cmp eax, ecx
cmova ecx, eax
lea eax, [ecx + 1]
mov dword [ebp - 0x168], ecx
push eax
lea ecx, [ebp - 0xc0]
call fcn.00401ff0
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 0xac], ecx
mov ecx, dword [str.1_2_416]
mov dword [ebp - 0xb0], 7
mov dword [eax], ecx
mov cx, word [0x409658]
mov word [eax + 4], cx
mov cl, byte [0x40965a]
mov byte [eax + 6], cl
mov dword [ebp - 0x180], eax
mov byte [eax + 7], 0
cmp edi, 0x10
jb 0x40479d
mov ecx, dword [ebp - 0xc0]
inc edi
mov eax, ecx
cmp edi, 0x1000
jb 0x40478d
mov ecx, dword [ecx - 4]
add edi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404da4
push edi
push ecx
call fcn.0040664c
mov eax, dword [ebp - 0x180]
add esp, 8
mov dword [ebp - 0xc0], eax
jmp 0x40464c
or esi, 0xffffffff
jmp 0x404d78
mov dword [ebp - 0xa8], 0
cmp byte [ebp - 0x161], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x94], 0xf
mov dword [ebp - 4], 0xffffffff
je 0x4047f4
push dword [ebp - 0x16c]
lea ecx, [ebp - 0xa8]
call fcn.00401dc0
jmp 0x4049ae
push 0x4086ec
push dword [ebp - 0x16c]
lea eax, [ebp - 0xd8]
push 0x4086f0
push eax
call fcn.00401cf0
add esp, 4
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.00403b20
add esp, 0xc
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00403b20
add esp, 0xc
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.00403b20
add esp, 0xc
lea ecx, [ebp - 0xc0]
cmp dword [ebp - 0xac], 0x10
cmovae ecx, dword [ebp - 0xc0]
push dword [ebp - 0xb0]
push ecx
mov ecx, eax
call fcn.004041c0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xf4], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xe4], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0xf4]
push str..dll
push eax
lea eax, [ebp - 0x118]
mov dword [ebp - 4], 0xffffffff
push eax
call fcn.00403b20
mov edi, eax
add esp, 0xc
lea eax, [ebp - 0xa8]
cmp eax, edi
je 0x404920
mov edx, dword [ebp - 0x94]
cmp edx, 0x10
jb 0x4048f1
mov ecx, dword [ebp - 0xa8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4048e7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404957
push edx
push ecx
call fcn.0040664c
add esp, 8
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0xa8], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x98], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call fcn.00401df0
mov edx, dword [ebp - 0xe0]
cmp edx, 0x10
jb 0x404967
mov ecx, dword [ebp - 0xf4]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40495d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40495d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040664c
add esp, 8
lea ecx, [ebp - 0x130]
mov dword [ebp - 0xe4], 0
mov dword [ebp - 0xe0], 0xf
mov byte [ebp - 0xf4], 0
call fcn.00401df0
lea ecx, [ebp - 0x148]
call fcn.00401df0
lea ecx, [ebp - 0x160]
call fcn.00401df0
lea ecx, [ebp - 0xd8]
call fcn.00401df0
cmp dword [ebp - 0x94], 0x10
lea eax, [ebp - 0xa8]
cmovae eax, dword [ebp - 0xa8]
push eax
push str.dll___s
call fcn.00401210
add esp, 8
lea ecx, [ebp - 0x1ec]
call fcn.00405cb0
cmp dword [ebp - 0x94], 0x10
lea eax, [ebp - 0xa8]
lea ecx, [ebp - 0x1ec]
cmovae eax, dword [ebp - 0xa8]
push eax
call fcn.00405d70
test al, al
jne 0x404a34
cmp dword [ebp - 0x94], 0x10
lea eax, [ebp - 0xa8]
cmovae eax, dword [ebp - 0xa8]
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.00401bf0
add esp, 8
lea ecx, [ebp - 0x1ec]
call fcn.00405ce0
or esi, 0xffffffff
jmp 0x404d27
lea ecx, [ebp - 0x1ec]
call fcn.00405ce0
lea eax, [ebp - 0x17c]
push eax
lea eax, [ebp - 0x1c4]
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 - 0x161], cl
test eax, eax
jne 0x404a9b
call esi
cmp eax, 0x2e4
jne 0x404a95
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.00401bf0
add esp, 4
or esi, 0xffffffff
jmp 0x404d27
mov cl, byte [ebp - 0x161]
test cl, cl
jne 0x404abb
call esi
push 0
push eax
push str.Launching_Oblivion_failed
push 0xb3
push str.D:_axOBSExOBSEobseloadermain.cpp
call fcn.00405c60
add esp, 0x14
cmp byte [0x40c040], 0
je 0x404ae7
push dword [0x40c044]
push dword [ebp - 0x17c]
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
test eax, eax
jne 0x404ae7
push str.couldnt_set_process_priority
call fcn.004041a0
add esp, 4
cmp byte [0x40c038], 0
je 0x404bbc
cmp byte [0x40c04c], 0
je 0x404b70
push str.using_old_editor_injection_method
call fcn.00401210
add esp, 4
push dword [ebp - 0x178]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x2710
push dword [ebp - 0x17c]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
cmp byte [0x40c049], 0
lea ecx, [ebp - 0xa8]
sete al
cmp dword [ebp - 0x94], 0x10
push eax
cmovae ecx, dword [ebp - 0xa8]
lea eax, [ebp - 0x17c]
push ecx
push eax
call fcn.00403dc0
add esp, 0xc
test al, al
jne 0x404cb2
push str.Couldnt_inject_dll.
call fcn.00401bf0
add esp, 4
jmp 0x404cb2
push str.using_new_editor_injection_method
call fcn.00401210
cmp dword [ebp - 0x94], 0x10
lea ecx, [ebp - 0x100]
lea eax, [ebp - 0xa8]
cmovae eax, dword [ebp - 0xa8]
push ecx
push eax
lea eax, [ebp - 0x17c]
push eax
call fcn.00403800
add esp, 0x10
test al, al
jne 0x404ca6
push str.Couldnt_inject_dll.
call fcn.00401bf0
jmp 0x404ca3
cmp byte [0x40c049], 0
lea ecx, [ebp - 0xa8]
sete al
cmp dword [ebp - 0x94], 0x10
push eax
cmovae ecx, dword [ebp - 0xa8]
lea eax, [ebp - 0x17c]
push ecx
push eax
call fcn.00403dc0
add esp, 0xc
test al, al
je 0x404ce2
cmp byte [0x40c039], 0
je 0x404c99
push str.OldblivionInjectionCompleted
push 0
push 0
push 0
mov byte [ebp - 0x161], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edi, eax
test edi, edi
je 0x404ccb
push 0
lea eax, [ebp - 0x17c]
push str.oldblivion.dll
push eax
call fcn.00403dc0
add esp, 0xc
test al, al
je 0x404c7c
push dword [0x40c03c]
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x404c69
cmp eax, 0x80
je 0x404c62
cmp eax, 0x102
jne 0x404c89
push str.LoadOldblivion:_waiting_for_oldblivion__WAIT_TIMEOUT
jmp 0x404c81
push str.LoadOldblivion:_waiting_for_oldblivion__WAIT_ABANDONED
jmp 0x404c81
push str.oldblivion_loaded
call fcn.00401210
mov byte [ebp - 0x161], 1
jmp 0x404c86
push str.couldnt_inject_oldblivion_dll
call fcn.00403b00
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x161], 0
je 0x404cdb
push str.launching_oblivion
call fcn.00401210
add esp, 4
push dword [ebp - 0x178]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp byte [0x40c04b], 0
je 0x404d0f
push 0xffffffffffffffff
push dword [ebp - 0x17c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x404d0f
call esi
push eax
push str.couldnt_create_oldblivion_sync_event___d_
call fcn.00403b00
add esp, 8
mov eax, str.Couldnt_load_oldblivion.
jmp 0x404ce7
mov eax, str.Couldnt_inject_dll.
push eax
call fcn.00401bf0
push str.terminating_oblivion_process
call fcn.00403b00
add esp, 8
push 0
push dword [ebp - 0x17c]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [0x40c04b], 0
push dword [ebp - 0x178]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x17c]
call esi
xor esi, esi
mov edx, dword [ebp - 0x94]
cmp edx, 0x10
jb 0x404d5d
mov ecx, dword [ebp - 0xa8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404d53
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404da4
push edx
push ecx
call fcn.0040664c
add esp, 8
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x94], 0xf
mov byte [ebp - 0xa8], 0
mov edx, dword [ebp - 0xac]
cmp edx, 0x10
jb 0x404db4
mov ecx, dword [ebp - 0xc0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404daa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x404daa
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040664c
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.004068ab
mov esp, ebp
pop ebp
ret 0x10