Function at 0x456830
Capabilities:
Get common file path
Set current directory
Terminate process

Disassembly:
sub esp, 0x34c
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x140], 0
mov eax, dword [0x5b8dbc]
test eax, eax
mov ebp, dword [esp + 0x364]
jne 0x45723c
mov al, byte [0x5b8cb0]
test al, al
je 0x456b7d
or ecx, 0xffffffff
xor eax, eax
mov edi, 0x5b8cb0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edx, [esp + 0x140]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x360]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, ecx
or ecx, 0xffffffff
mov esi, edi
lea edx, [esp + 0x140]
mov edi, edx
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, str..arc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, ecx
or ecx, 0xffffffff
mov esi, edi
lea edx, [esp + 0x140]
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x140]
and ecx, 3
push 0x4ad274
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00467119
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x456b7d
push ebx
push 1
lea eax, [ebp + 0x204]
push 0x1c
push eax
call fcn.004681cd
add esp, 0x10
cmp eax, 1
jne 0x456ec7
lea eax, [ebp + 0x204]
mov ecx, 4
mov edi, str.MajiroArcV1.000
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x456a2e
mov eax, dword [ebp + 0x214]
lea ecx, [eax*8 + 0x108]
push ecx
call fcn.004564a0
mov edx, dword [ebp + 0x214]
mov esi, eax
push ebx
push 1
lea eax, [edx*8 + 8]
push eax
push esi
mov dword [esp + 0x24], esi
call fcn.004681cd
add esp, 0x14
cmp eax, 1
jne 0x456ec7
mov eax, dword [ebp + 0x214]
lea ecx, [eax + eax*2]
lea edx, [ecx*4 + 0x10c]
push edx
call fcn.004564a0
mov dword [ebp + 0x220], eax
mov eax, dword [ebp + 0x214]
add esp, 4
xor edx, edx
test eax, eax
jle 0x4569f0
xor ecx, ecx
lea eax, [esi + 4]
mov edi, dword [eax - 4]
mov esi, dword [ebp + 0x220]
mov dword [ecx + esi], edi
mov edi, dword [eax]
mov esi, dword [ebp + 0x220]
mov dword [ecx + esi + 4], edi
mov edi, dword [eax]
mov esi, dword [eax + 8]
sub esi, edi
mov edi, dword [ebp + 0x220]
mov dword [ecx + edi + 8], esi
mov esi, dword [ebp + 0x214]
inc edx
add eax, 8
add ecx, 0xc
cmp edx, esi
jl 0x4569b2
mov esi, dword [esp + 0x10]
push esi
call fcn.0046728e
mov eax, dword [ebp + 0x214]
mov ecx, dword [ebp + 0x220]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*4 - 8]
lea eax, [ecx + eax*4]
mov eax, dword [eax - 4]
push 0
lea ecx, [edx + eax - 1]
push ecx
push ebx
call fcn.0046954f
add esp, 0x10
mov dword [ebp + 0x238], 1
jmp 0x456b56
mov ecx, 4
mov edi, str.MajiroArcV2.000
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x456ac8
mov eax, dword [ebp + 0x214]
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x100]
push ecx
call fcn.004564a0
mov ecx, dword [ebp + 0x214]
push ebx
lea edx, [ecx + ecx*2]
push 1
shl edx, 2
push edx
push eax
mov dword [ebp + 0x220], eax
call fcn.004681cd
add esp, 0x14
cmp eax, 1
jne 0x456ec7
mov ecx, dword [ebp + 0x214]
xor edx, edx
test ecx, ecx
jle 0x456aac
mov eax, dword [ebp + 0x220]
add eax, 4
mov esi, ecx
mov ecx, dword [eax + 4]
mov edi, dword [eax]
add ecx, edi
cmp edx, ecx
jg 0x456aa6
mov edx, ecx
add eax, 0xc
dec esi
jne 0x456a99
push 0
dec edx
push edx
push ebx
call fcn.0046954f
add esp, 0xc
mov dword [ebp + 0x238], 1
jmp 0x456b56
mov ecx, 4
mov edi, str.MajiroArcV3.000
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x456ec7
mov eax, dword [ebp + 0x214]
add eax, 0x10
shl eax, 4
push eax
call fcn.004564a0
mov ecx, dword [ebp + 0x214]
push ebx
push 1
shl ecx, 4
push ecx
push eax
mov dword [ebp + 0x224], eax
call fcn.004681cd
add esp, 0x14
cmp eax, 1
jne 0x456ec7
mov ecx, dword [ebp + 0x214]
xor edx, edx
test ecx, ecx
jle 0x456b3f
mov eax, dword [ebp + 0x224]
add eax, 8
mov esi, ecx
mov ecx, dword [eax + 4]
mov edi, dword [eax]
add ecx, edi
cmp edx, ecx
jg 0x456b39
mov edx, ecx
add eax, 0x10
dec esi
jne 0x456b2c
push 0
dec edx
push edx
push ebx
call fcn.0046954f
add esp, 0xc
mov dword [ebp + 0x238], 2
push ebx
push 1
lea edx, [esp + 0x1c]
push 1
push edx
call fcn.004681cd
add esp, 0x10
cmp eax, 1
jne 0x456ec7
push ebx
push eax
push eax
lea eax, [esp + 0x20]
jmp 0x456e5f
mov edi, dword [esp + 0x360]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edx, [esp + 0x140]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
xor eax, eax
mov edi, str..arc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, ecx
or ecx, 0xffffffff
mov esi, edi
lea edx, [esp + 0x140]
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x140]
and ecx, 3
push 0x4ad274
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00467119
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x456ee9
push ebx
push 1
lea eax, [ebp + 0x204]
push 0x1c
push eax
call fcn.004681cd
add esp, 0x10
cmp eax, 1
jne 0x456ec7
lea eax, [ebp + 0x204]
mov ecx, 4
mov edi, str.MajiroArcV1.000
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x456d19
mov eax, dword [ebp + 0x214]
lea ecx, [eax*8 + 0x108]
push ecx
call fcn.004564a0
mov edx, dword [ebp + 0x214]
mov esi, eax
push ebx
push 1
lea eax, [edx*8 + 8]
push eax
push esi
mov dword [esp + 0x28], esi
call fcn.004681cd
add esp, 0x14
cmp eax, 1
jne 0x456ec7
mov eax, dword [ebp + 0x214]
lea ecx, [eax + eax*2]
lea edx, [ecx*4 + 0x10c]
push edx
call fcn.004564a0
mov dword [ebp + 0x220], eax
mov eax, dword [ebp + 0x214]
add esp, 4
xor edx, edx
test eax, eax
jle 0x456cdb
xor ecx, ecx
lea eax, [esi + 4]
mov edi, dword [eax - 4]
mov esi, dword [ebp + 0x220]
mov dword [ecx + esi], edi
mov edi, dword [eax]
mov esi, dword [ebp + 0x220]
mov dword [ecx + esi + 4], edi
mov edi, dword [eax]
mov esi, dword [eax + 8]
sub esi, edi
mov edi, dword [ebp + 0x220]
mov dword [ecx + edi + 8], esi
mov esi, dword [ebp + 0x214]
inc edx
add eax, 8
add ecx, 0xc
cmp edx, esi
jl 0x456c9d
mov esi, dword [esp + 0x14]
push esi
call fcn.0046728e
mov eax, dword [ebp + 0x214]
mov ecx, dword [ebp + 0x220]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*4 - 8]
lea eax, [ecx + eax*4]
mov eax, dword [eax - 4]
push 0
lea ecx, [edx + eax - 1]
push ecx
push ebx
call fcn.0046954f
add esp, 0x10
mov dword [ebp + 0x238], 1
jmp 0x456e41
mov ecx, 4
mov edi, str.MajiroArcV2.000
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x456db3
mov eax, dword [ebp + 0x214]
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x100]
push ecx
call fcn.004564a0
mov ecx, dword [ebp + 0x214]
push ebx
lea edx, [ecx + ecx*2]
push 1
shl edx, 2
push edx
push eax
mov dword [ebp + 0x220], eax
call fcn.004681cd
add esp, 0x14
cmp eax, 1
jne 0x456ec7
mov ecx, dword [ebp + 0x214]
xor edx, edx
test ecx, ecx
jle 0x456d97
mov eax, dword [ebp + 0x220]
add eax, 4
mov esi, ecx
mov ecx, dword [eax + 4]
mov edi, dword [eax]
add ecx, edi
cmp edx, ecx
jg 0x456d91
mov edx, ecx
add eax, 0xc
dec esi
jne 0x456d84
push 0
dec edx
push edx
push ebx
call fcn.0046954f
add esp, 0xc
mov dword [ebp + 0x238], 1
jmp 0x456e41
mov ecx, 4
mov edi, str.MajiroArcV3.000
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x456ec7
mov eax, dword [ebp + 0x214]
add eax, 0x10
shl eax, 4
push eax
call fcn.004564a0
mov ecx, dword [ebp + 0x214]
push ebx
push 1
shl ecx, 4
push ecx
push eax
mov dword [ebp + 0x224], eax
call fcn.004681cd
add esp, 0x14
cmp eax, 1
jne 0x456ec7
mov ecx, dword [ebp + 0x214]
xor edx, edx
test ecx, ecx
jle 0x456e2a
mov eax, dword [ebp + 0x224]
add eax, 8
mov esi, ecx
mov ecx, dword [eax + 4]
mov edi, dword [eax]
add ecx, edi
cmp edx, ecx
jg 0x456e24
mov edx, ecx
add eax, 0x10
dec esi
jne 0x456e17
push 0
dec edx
push edx
push ebx
call fcn.0046954f
add esp, 0xc
mov dword [ebp + 0x238], 2
push ebx
push 1
lea edx, [esp + 0x18]
push 1
push edx
call fcn.004681cd
add esp, 0x10
cmp eax, 1
jne 0x456ec7
push ebx
push eax
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004681cd
add esp, 0x10
cmp eax, 1
je 0x456ec7
push ebx
call fcn.00466f32
or ecx, 0xffffffff
xor eax, eax
add esp, 4
lea edi, [esp + 0x140]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x360]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
lea edx, [ebp + 0x104]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x45723c
mov ecx, dword [esp + 0x360]
push ecx
push 0x4b4818
call fcn.00451d60
push ebx
call fcn.00466f32
add esp, 0xc
push 0xffffffffffffffff
call fcn.00467da5
xor eax, eax
mov ecx, 7
lea edi, [ebp + 0x204]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x220]
xor esi, esi
cmp eax, esi
je 0x456f13
push eax
call fcn.0046728e
add esp, 4
mov dword [ebp + 0x220], esi
mov eax, dword [ebp + 0x224]
cmp eax, esi
je 0x456f2c
push eax
call fcn.0046728e
add esp, 4
mov dword [ebp + 0x224], esi
mov al, byte [0x5b8cb0]
test al, al
je 0x4570eb
or ecx, 0xffffffff
xor eax, eax
mov edi, 0x5b8cb0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov ebx, dword [esp + 0x360]
lea edx, [esp + 0x140]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
xor eax, eax
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
lea edx, [esp + 0x140]
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
lea eax, [esp + 0x18]
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [esp + 0x144]
push ecx
call fcn.004a03e4
add esp, 8
test eax, eax
jne 0x4570f2
mov eax, dword [esp + 0x1e]
test ah, 0x40
je 0x4570f2
or ecx, 0xffffffff
xor eax, eax
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edx, [ebp + 0x104]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x140]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
mov al, byte [ecx + ebp - 2]
dec ecx
mov bl, 0x5c
cmp al, bl
je 0x457048
or ecx, 0xffffffff
xor eax, eax
mov edi, 0x4ad3b8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
or ecx, 0xffffffff
mov esi, edi
mov edi, ebp
repne scasb al, byte es:[edi]
mov ecx, edx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x140]
push eax
push 0x104
mov dword [ebp + 0x238], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x40]
push edx
push 0x103
push ebp
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
push 0
push 0
lea eax, [esp + 0x24c]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00467772
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00466da0
lea edx, [esp + 0x260]
push edx
lea eax, [esp + 0x5c]
push eax
call fcn.00466db0
or ecx, 0xffffffff
xor eax, eax
add esp, 0x24
lea edi, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
mov al, byte [esp + ecx + 0x3a]
dec ecx
cmp al, bl
jne 0x4570e2
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x3b], al
lea ecx, [esp + 0x3c]
jmp 0x457235
mov ebx, dword [esp + 0x360]
lea edx, [esp + 0x18]
push edx
push ebx
call fcn.004a03e4
add esp, 8
test eax, eax
jne 0x457357
mov eax, dword [esp + 0x1e]
test ah, 0x40
je 0x457357
or ecx, 0xffffffff
xor eax, eax
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edx, [ebp + 0x104]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
xor eax, eax
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
mov al, byte [ecx + ebp - 2]
dec ecx
mov bl, 0x5c
cmp al, bl
je 0x457197
or ecx, 0xffffffff
xor eax, eax
mov edi, 0x4ad3b8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
or ecx, 0xffffffff
mov esi, edi
mov edi, ebp
repne scasb al, byte es:[edi]
mov ecx, edx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x140]
push eax
push 0x104
mov dword [ebp + 0x238], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x40]
push edx
push 0x103
push ebp
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
push 0
push 0
lea eax, [esp + 0x24c]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00467772
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00466da0
lea edx, [esp + 0x260]
push edx
lea eax, [esp + 0x5c]
push eax
call fcn.00466db0
or ecx, 0xffffffff
xor eax, eax
add esp, 0x24
lea edi, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
mov al, byte [esp + ecx + 0x3a]
dec ecx
cmp al, bl
jne 0x457231
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x3b], al
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [0x5b8dbc]
inc edx
mov dword [0x5b8dbc], edx
mov eax, dword [ebp + 0x238]
test eax, eax
jne 0x45731d
lea eax, [esp + 0x3c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.004564a0
or ecx, 0xffffffff
mov ebx, eax
xor eax, eax
lea edi, [esp + 0x40]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x248]
mov ecx, edx
push eax
and ecx, 3
push 0x4b4814
rep movsb byte es:[edi], byte [esi]
call fcn.00469336
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x45730a
push ebx
lea ecx, [esp + 0x248]
push ecx
push ebp
call fcn.00457370
lea edx, [esp + 0x250]
push edx
push esi
call fcn.00469403
add esp, 0x14
test eax, eax
jne 0x457301
push ebx
lea eax, [esp + 0x248]
push eax
push ebp
call fcn.00457370
lea ecx, [esp + 0x250]
push ecx
push esi
call fcn.00469403
add esp, 0x14
test eax, eax
je 0x4572dd
push esi
call fcn.004694cb
add esp, 4
mov eax, dword [ebp + 0x22c]
test eax, eax
jne 0x45731d
push ebx
call fcn.0046728e
add esp, 4
mov edx, dword [0x5b8dbc]
dec edx
mov dword [0x5b8dbc], edx
mov al, byte [esp + 0x140]
test al, al
je 0x457343
lea eax, [esp + 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [ebp + 0x238]
test eax, eax
jne 0x45735a
mov ecx, dword [ebp + 0x22c]
test ecx, ecx
jne 0x45735a
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34c
ret