Function at 0x4804b0
Capabilities:
Get common file path
Read file on windows
Set current directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x38c
mov eax, dword [0x4d3100]
xor eax, esp
mov dword [esp + 0x388], eax
cmp dword [0x53bf94], 0
push ebx
push esi
mov esi, edx
mov byte [esp + 0x17c], 0
mov ebx, ecx
mov dword [esp + 0x14], esi
push edi
mov dword [esp + 0x1c], ebx
jne 0x480883
cmp byte [0x53bfa0], 0
je 0x4809bb
xor ecx, ecx
lea ecx, [ecx]
mov al, byte [ecx + 0x53bfa0]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x17f], al
test al, al
jne 0x480500
mov edx, ebx
mov esi, ebx
mov al, byte [edx]
inc edx
test al, al
jne 0x480518
lea edi, [esp + 0x180]
sub edx, esi
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x480530
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x180]
dec ecx
mov edi, edi
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x480550
mov eax, dword [str..arc]
mov dword [ecx], eax
mov al, byte [0x4c7598]
mov byte [ecx + 4], al
lea eax, [esp + 0x180]
push 0x4c3d40
push eax
call fcn.00494396
mov esi, dword [esp + 0x20]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x4809bb
push eax
push 1
lea edi, [esi + 0x204]
push 0x1c
push edi
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480eef
mov ecx, edi
mov dword [esp + 0x10], 0xc
mov edx, str.MajiroArcV1.000
lea ebx, [ebx]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4806c2
add ecx, 4
add edx, 4
sub dword [esp + 0x10], 4
jae 0x4805c0
mov eax, dword [esi + 0x214]
lea ecx, [eax*8 + 0x108]
call fcn.00484ed0
mov ecx, dword [esi + 0x214]
mov edi, dword [esp + 0x14]
push edi
push 1
lea ecx, [ecx*8 + 8]
mov dword [esp + 0x18], eax
push ecx
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
mov eax, dword [esi + 0x214]
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x10c]
call fcn.00484ed0
cmp dword [esi + 0x214], 0
mov dword [esi + 0x220], eax
jle 0x480683
mov edx, dword [esp + 0x10]
xor edi, edi
add edx, 4
xor ebx, ebx
mov ecx, dword [esi + 0x220]
lea edx, [edx + 8]
mov eax, dword [edx - 0xc]
lea edi, [edi + 0xc]
inc ebx
mov dword [edi + ecx - 0xc], eax
mov ecx, dword [esi + 0x220]
mov eax, dword [edx - 8]
mov dword [edi + ecx - 8], eax
mov ecx, dword [edx]
mov eax, dword [esi + 0x220]
sub ecx, dword [edx - 8]
mov dword [edi + eax - 4], ecx
cmp ebx, dword [esi + 0x214]
jl 0x480643
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.00494034
mov eax, dword [esi + 0x214]
add esp, 4
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x220]
lea eax, [eax + ecx*4]
mov ecx, dword [eax - 8]
mov eax, dword [eax - 4]
dec eax
add eax, ecx
push 0
push eax
push edi
call fcn.00497be2
mov dword [esi + 0x238], 1
jmp 0x480815
mov ecx, edi
mov dword [esp + 0x10], 0xc
mov edx, str.MajiroArcV2.000
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x480767
add ecx, 4
add edx, 4
sub dword [esp + 0x10], 4
jae 0x4806d1
mov eax, dword [esi + 0x214]
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x100]
call fcn.00484ed0
mov ecx, dword [esi + 0x214]
mov edi, dword [esp + 0x14]
push edi
push 1
lea ecx, [ecx + ecx*2]
mov dword [esi + 0x220], eax
shl ecx, 2
push ecx
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
mov eax, dword [esi + 0x214]
xor edx, edx
test eax, eax
jle 0x48075f
mov ebx, dword [esi + 0x220]
xor edi, edi
mov esi, eax
nop
mov eax, dword [ebx + edi + 4]
lea edi, [edi + 0xc]
add eax, dword [ebx + edi - 4]
cmp edx, eax
cmovle edx, eax
dec esi
jne 0x480740
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
lea eax, [edx - 1]
jmp 0x4806aa
mov ecx, str.MajiroArcV3.000
mov edx, 0xc
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x480eef
add edi, 4
add ecx, 4
sub edx, 4
jae 0x480771
mov ecx, dword [esi + 0x214]
add ecx, 0x10
shl ecx, 4
call fcn.00484ed0
mov edi, dword [esp + 0x14]
mov ecx, dword [esi + 0x214]
push edi
push 1
shl ecx, 4
push ecx
push eax
mov dword [esi + 0x224], eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
mov eax, dword [esi + 0x214]
xor edx, edx
test eax, eax
jle 0x4807ff
mov ebx, dword [esi + 0x224]
xor edi, edi
mov esi, eax
jmp 0x4807e0
mov eax, dword [edi + ebx + 8]
lea edi, [edi + 0x10]
add eax, dword [edi + ebx - 4]
cmp edx, eax
cmovle edx, eax
dec esi
jne 0x4807e0
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
push 0
lea eax, [edx - 1]
push eax
push edi
call fcn.00497be2
mov dword [esi + 0x238], 2
add esp, 0xc
lea eax, [esp + 0x20]
push edi
push 1
push 1
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
push edi
push eax
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
je 0x480ef3
push edi
call fcn.00494b54
lea ecx, [esp + 0x184]
mov edx, esi
mov eax, ecx
add esp, 4
sub edx, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x480862
mov ecx, esi
sub ecx, ebx
mov al, byte [ebx]
lea ebx, [ebx + 1]
mov byte [ecx + ebx + 0x103], al
test al, al
jne 0x480873
inc dword [0x53bf94]
cmp dword [esi + 0x238], 0
jne 0x480973
lea eax, [esp + 0x288]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x288]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4808b3
sub ecx, edx
lea eax, [ecx + 0x21]
push eax
call fcn.00497cab
mov edi, eax
add esp, 4
test edi, edi
jne 0x4808e1
push 0x10
push str.malloc
push 0x4c9a90
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x288]
mov edx, edi
mov eax, ecx
sub edx, eax
mov edi, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4808f0
lea eax, [esp + 0x58]
push eax
push 0x4c9a54
call fcn.00497982
mov ebx, eax
add esp, 8
cmp ebx, 0xffffffff
je 0x480961
push edi
lea edx, [esp + 0x5c]
mov ecx, esi
call fcn.00480340
add esp, 4
lea eax, [esp + 0x58]
push eax
push ebx
call fcn.00497a0d
add esp, 8
test eax, eax
jne 0x480958
push edi
lea edx, [esp + 0x5c]
mov ecx, esi
call fcn.00480340
add esp, 4
lea eax, [esp + 0x58]
push eax
push ebx
call fcn.00497a0d
add esp, 8
test eax, eax
je 0x480937
push ebx
call fcn.00497a67
add esp, 4
cmp dword [esi + 0x22c], 0
jne 0x480973
push edi
call fcn.00494034
add esp, 4
dec dword [0x53bf94]
cmp byte [esp + 0x180], 0
je 0x480991
lea eax, [esp + 0x180]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esi + 0x238]
test eax, eax
jne 0x4809a6
cmp dword [esi + 0x22c], eax
jne 0x4809a6
or eax, 0xffffffff
mov ecx, dword [esp + 0x394]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00493955
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x180]
mov ecx, ebx
sub edx, ebx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4809c6
lea ecx, [esp + 0x180]
dec ecx
jmp 0x4809e0
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4809e0
mov eax, dword [str..arc]
mov dword [ecx], eax
mov al, byte [0x4c7598]
mov byte [ecx + 4], al
lea eax, [esp + 0x180]
push 0x4c3d40
push eax
call fcn.00494396
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x480d18
push eax
push 1
lea edi, [esi + 0x204]
push 0x1c
push edi
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480eef
mov ecx, edi
mov dword [esp + 0x10], 0xc
mov edx, str.MajiroArcV1.000
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x480b4f
add ecx, 4
add edx, 4
sub dword [esp + 0x10], 4
jae 0x480a46
mov eax, dword [esi + 0x214]
lea ecx, [eax*8 + 0x108]
call fcn.00484ed0
mov ecx, dword [esi + 0x214]
mov edi, dword [esp + 0x14]
push edi
push 1
lea ecx, [ecx*8 + 8]
mov dword [esp + 0x18], eax
push ecx
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
mov eax, dword [esi + 0x214]
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x10c]
call fcn.00484ed0
cmp dword [esi + 0x214], 0
mov dword [esi + 0x220], eax
jle 0x480b10
mov edx, dword [esp + 0x10]
xor edi, edi
add edx, 4
xor ebx, ebx
lea esp, [esp]
mov ecx, dword [esi + 0x220]
lea edx, [edx + 8]
mov eax, dword [edx - 0xc]
lea edi, [edi + 0xc]
inc ebx
mov dword [edi + ecx - 0xc], eax
mov ecx, dword [esi + 0x220]
mov eax, dword [edx - 8]
mov dword [edi + ecx - 8], eax
mov ecx, dword [edx]
mov eax, dword [esi + 0x220]
sub ecx, dword [edx - 8]
mov dword [edi + eax - 4], ecx
cmp ebx, dword [esi + 0x214]
jl 0x480ad0
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.00494034
mov eax, dword [esi + 0x214]
add esp, 4
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x220]
lea eax, [eax + ecx*4]
mov ecx, dword [eax - 8]
mov eax, dword [eax - 4]
dec eax
add eax, ecx
push 0
push eax
push edi
call fcn.00497be2
mov dword [esi + 0x238], 1
jmp 0x480ca5
mov ecx, edi
mov dword [esp + 0x10], 0xc
mov edx, str.MajiroArcV2.000
mov edi, edi
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x480bf7
add ecx, 4
add edx, 4
sub dword [esp + 0x10], 4
jae 0x480b60
mov eax, dword [esi + 0x214]
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x100]
call fcn.00484ed0
mov ecx, dword [esi + 0x214]
mov edi, dword [esp + 0x14]
push edi
push 1
lea ecx, [ecx + ecx*2]
mov dword [esi + 0x220], eax
shl ecx, 2
push ecx
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
mov eax, dword [esi + 0x214]
xor edx, edx
test eax, eax
jle 0x480bef
mov ebx, dword [esi + 0x220]
xor edi, edi
mov esi, eax
mov edi, edi
mov eax, dword [ebx + edi + 4]
lea edi, [edi + 0xc]
add eax, dword [ebx + edi - 4]
cmp edx, eax
cmovle edx, eax
dec esi
jne 0x480bd0
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
lea eax, [edx - 1]
jmp 0x480b37
mov ecx, str.MajiroArcV3.000
mov edx, 0xc
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x480eef
add edi, 4
add ecx, 4
sub edx, 4
jae 0x480c01
mov ecx, dword [esi + 0x214]
add ecx, 0x10
shl ecx, 4
call fcn.00484ed0
mov edi, dword [esp + 0x14]
mov ecx, dword [esi + 0x214]
push edi
push 1
shl ecx, 4
push ecx
push eax
mov dword [esi + 0x224], eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
mov eax, dword [esi + 0x214]
xor edx, edx
test eax, eax
jle 0x480c8f
mov ebx, dword [esi + 0x224]
xor edi, edi
mov esi, eax
jmp 0x480c70
mov eax, dword [ebx + edi + 8]
lea edi, [edi + 0x10]
add eax, dword [ebx + edi - 4]
cmp edx, eax
cmovle edx, eax
dec esi
jne 0x480c70
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
push 0
lea eax, [edx - 1]
push eax
push edi
call fcn.00497be2
mov dword [esi + 0x238], 2
add esp, 0xc
lea eax, [esp + 0x24]
push edi
push 1
push 1
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
jne 0x480ef3
push edi
push eax
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00495739
add esp, 0x10
cmp eax, 1
je 0x480ef3
push edi
call fcn.00494b54
lea ecx, [esp + 0x184]
mov edx, esi
mov eax, ecx
add esp, 4
sub edx, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x480cf2
mov ecx, esi
sub ecx, ebx
mov al, byte [ebx]
lea ebx, [ebx + 1]
mov byte [ecx + ebx + 0x103], al
test al, al
jne 0x480d03
jmp 0x480883
xorps xmm0, xmm0
movdqu xmmword [esi + 0x204], xmm0
movq qword [esi + 0x214], xmm0
mov dword [esi + 0x21c], 0
mov eax, dword [esi + 0x220]
test eax, eax
je 0x480d52
push eax
call fcn.00494034
add esp, 4
mov dword [esi + 0x220], 0
mov eax, dword [esi + 0x224]
test eax, eax
je 0x480d6f
push eax
call fcn.00494034
add esp, 4
mov dword [esi + 0x224], 0
cmp byte [0x53bfa0], 0
je 0x480e75
xor ecx, ecx
mov edi, edi
mov al, byte [ecx + 0x53bfa0]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x17f], al
test al, al
jne 0x480d80
mov edx, ebx
mov esi, ebx
mov al, byte [edx]
inc edx
test al, al
jne 0x480d98
lea edi, [esp + 0x180]
sub edx, esi
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x480db0
mov ecx, edx
lea eax, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
lea eax, [esp + 0x184]
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00497c65
mov esi, dword [esp + 0x20]
add esp, 8
test eax, eax
jne 0x480e75
test dword [esp + 0x2e], 0x4000
je 0x480e75
mov ecx, esi
sub ecx, ebx
lea esp, [esp]
mov al, byte [ebx]
lea ebx, [ebx + 1]
mov byte [ecx + ebx + 0x103], al
test al, al
jne 0x480e00
lea ecx, [esp + 0x180]
mov edx, esi
mov eax, ecx
sub edx, eax
lea ecx, [ecx]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x480e20
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x480e32
sub ecx, edx
cmp byte [ecx + esi - 1], 0x5c
je 0x480e58
lea edi, [esi - 1]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x480e45
mov ax, word [0x4c3b10]
mov word [edi], ax
mov edx, esi
mov dword [esi + 0x238], 0
lea ecx, [esp + 0x180]
call fcn.00480240
jmp 0x480883
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.00497c65
add esp, 8
test eax, eax
jne 0x4809a3
test dword [esp + 0x2e], 0x4000
je 0x4809a3
mov edx, esi
mov ecx, ebx
sub edx, ebx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx + 0x103], al
test al, al
jne 0x480ea0
mov ecx, esi
sub ecx, ebx
mov al, byte [ebx]
lea ebx, [ebx + 1]
mov byte [ecx + ebx - 1], al
test al, al
jne 0x480eb4
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x480ec6
sub ecx, edx
cmp byte [ecx + esi - 1], 0x5c
je 0x480e58
lea edi, [esi - 1]
lea esp, [esp]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x480ee0
jmp 0x480e4f
mov edi, dword [esp + 0x14]
push ebx
push 0x4c9a18
call fcn.00485990
push edi
call fcn.00494b54
add esp, 0xc
push 0xffffffffffffffff
call fcn.0049501f
int3