Function at 0x408d60
Capabilities:
Set current directory

Disassembly:
sub esp, 0xa40
mov eax, dword [0x42f114]
xor eax, esp
mov dword [esp + 0xa3c], eax
mov eax, dword [esp + 0xa44]
push esi
mov esi, dword [esp + 0xa50]
push 1
push str.KmSFX
mov dword [esp + 0x1c], eax
call fcn.0040d810
push esi
push str.KmSFX_____s__n
call fcn.0040d640
push 0x39218
call fcn.00414f91
add esp, 0x14
test eax, eax
je 0x408db8
mov ecx, eax
call fcn.0040d220
jmp 0x408dba
xor eax, eax
push ebx
push ebp
push edi
push 0x428788
push esi
mov ecx, eax
mov dword [esp + 0x20], eax
call fcn.0040d230
mov ebx, eax
push ebx
push str.Arguments____d_n
mov dword [esp + 0x24], ebx
call fcn.0040d550
add esp, 8
xor esi, esi
test ebx, ebx
jle 0x408e4f
mov eax, dword [esp + 0x18]
mov ebp, eax
lea edi, [eax + 0x130b0]
jmp 0x408e04
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x39214], 0
je 0x408e1f
xor ecx, ecx
cmp esi, dword [eax + 0x39210]
setge cl
dec ecx
and ecx, edi
mov eax, ecx
jmp 0x408e2f
xor edx, edx
cmp esi, dword [eax + 0x39210]
setge dl
dec edx
and edx, ebp
mov eax, edx
push eax
push esi
push str.___d____s__n
call fcn.0040d640
inc esi
add esp, 0xc
add edi, 0x208
add ebp, 0x104
cmp esi, ebx
jl 0x408e00
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x236]
push ecx
mov word [esp + 0x238], ax
call fcn.00415440
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x3a]
push eax
mov word [esp + 0x3c], dx
call fcn.00415440
add esp, 0x18
test ebx, ebx
jle 0x409061
xor ecx, ecx
push 0x40e
push ecx
lea edx, [esp + 0x43e]
push edx
mov word [esp + 0x440], cx
call fcn.00415440
xor edi, edi
add esp, 0xc
cmp dword [esp + 0x1c], edi
jle 0x409061
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x10], eax
add eax, 0x130b0
mov dword [esp + 0x14], eax
nop
mov bl, byte [ebp + 0x39214]
mov esi, dword [ebp + 0x39210]
xor ecx, ecx
test bl, bl
je 0x408eee
cmp edi, esi
setge cl
dec ecx
and ecx, dword [esp + 0x14]
jmp 0x408ef8
cmp edi, esi
setge cl
dec ecx
and ecx, dword [esp + 0x10]
lea edx, [esp + 0x434]
nop
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x408f00
cmp word [esp + 0x434], 0x2f
jne 0x408f29
mov eax, 0x2d
mov word [esp + 0x434], ax
xor eax, eax
test bl, bl
je 0x408f3b
cmp edi, esi
setge al
dec eax
and eax, dword [esp + 0x14]
jmp 0x408f45
cmp edi, esi
setge al
dec eax
and eax, dword [esp + 0x10]
push 0x428758
push eax
call fcn.004156df
mov esi, dword [esp + 0x24]
add esp, 8
test eax, eax
jne 0x408fb6
lea ecx, [esi - 1]
cmp edi, ecx
jge 0x408fb6
cmp byte [ebp + 0x39214], al
je 0x408f85
lea edx, [edi + 1]
cmp edx, dword [ebp + 0x39210]
jl 0x408f79
xor ecx, ecx
jmp 0x408f9e
mov ecx, dword [esp + 0x14]
add ecx, 0x208
jmp 0x408f9e
lea eax, [edi + 1]
cmp eax, dword [ebp + 0x39210]
jl 0x408f94
xor ecx, ecx
jmp 0x408f9e
mov ecx, dword [esp + 0x10]
add ecx, 0x104
lea edx, [esp + 0x22c]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x408fa5
xor eax, eax
cmp byte [ebp + 0x39214], al
je 0x408fd0
cmp edi, dword [ebp + 0x39210]
setge al
dec eax
and eax, dword [esp + 0x14]
jmp 0x408fde
cmp edi, dword [ebp + 0x39210]
setge al
dec eax
and eax, dword [esp + 0x10]
push 0x428750
push eax
call fcn.004156df
add esp, 8
test eax, eax
jne 0x409048
lea ecx, [esi - 1]
cmp edi, ecx
jge 0x409048
cmp byte [ebp + 0x39214], al
je 0x40901a
lea edx, [edi + 1]
cmp edx, dword [ebp + 0x39210]
jl 0x40900e
xor ecx, ecx
jmp 0x409033
mov ecx, dword [esp + 0x14]
add ecx, 0x208
jmp 0x409033
lea eax, [edi + 1]
cmp eax, dword [ebp + 0x39210]
jl 0x409029
xor ecx, ecx
jmp 0x409033
mov ecx, dword [esp + 0x10]
add ecx, 0x104
lea edx, [esp + 0x24]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x409037
add dword [esp + 0x14], 0x208
add dword [esp + 0x10], 0x104
inc edi
cmp edi, esi
jl 0x408ed0
push 0x850
xor edi, edi
push edi
push 0x4305e8
call fcn.00415440
mov esi, dword [esp + 0x2c]
push 0x934
mov dword [0x4305f4], esi
call fcn.00414f91
add esp, 0x10
cmp eax, edi
je 0x409097
mov ecx, eax
call fcn.004128e0
jmp 0x409099
xor eax, eax
push 0x2b024
mov dword [0x4305e8], eax
call fcn.00414f91
add esp, 4
cmp eax, edi
je 0x4090b9
push edi
mov ecx, eax
call fcn.004145c0
jmp 0x4090bb
xor eax, eax
push 0x28c834
mov dword [0x4305ec], eax
call fcn.00414f91
add esp, 4
cmp eax, edi
je 0x4090da
mov ecx, eax
call fcn.00403340
jmp 0x4090dc
xor eax, eax
push 0x104
lea ecx, [esp + 0x848]
push ecx
push edi
mov dword [0x4305f0], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, dword [0x4305e8]
push edi
push 0x4305f8
lea edx, [esp + 0x84c]
push edx
call fcn.00411d70
mov eax, 0x4305f8
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x409116
sub eax, edx
sar eax, 1
cmp word [eax*2 + 0x4305f6], 0x5c
jne 0x409159
mov eax, 0x4305f8
lea edx, [eax + 2]
jmp 0x409140
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x409140
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [eax*2 + 0x4305f6], cx
push 0x4305f8
push str._g_dta.wszDirRoot___s__n
call fcn.0040d640
add esp, 8
push 0x4305f8
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea edx, [esp + 0x22c]
push edx
mov dword [0x430808], edi
mov dword [0x43080c], edi
call fcn.00408b60
mov dword [0x430808], eax
lea eax, [esp + 0x28]
push eax
call fcn.00408b60
mov ecx, dword [0x430808]
push ecx
push str._Install_Locale_from_Command_line____04x__n
mov dword [0x43080c], eax
call fcn.0040d550
mov edx, dword [0x43080c]
push edx
push str._UI______Locale_from_Command_line____04x__n
call fcn.0040d550
add esp, 0x18
cmp dword [0x430808], edi
jne 0x4091f3
mov eax, dword [0x4305e8]
cmp dword [eax], 0x12
mov ecx, dword [0x4305ec]
jg 0x4091e4
push 1
jmp 0x4091e9
push 0x100
call fcn.00414240
mov dword [0x430808], eax
mov eax, dword [0x43080c]
cmp eax, edi
jne 0x40920d
mov ecx, dword [0x4305ec]
push edi
call fcn.00414240
mov dword [0x43080c], eax
cmp dword [0x430808], 0x816
je 0x409223
and dword [0x430808], 0xff
cmp eax, 0x816
je 0x409234
and eax, 0xff
mov dword [0x43080c], eax
mov ecx, dword [0x4305ec]
push 1
push 0x6b
push 9
push esi
call fcn.00414350
mov ecx, dword [0x43080c]
push ecx
mov ecx, dword [0x4305ec]
call fcn.00413b90
mov ecx, dword [0x430808]
mov edx, dword [0x4305ec]
mov eax, dword [edx + 8]
push ecx
push str._Locale_to_use_For_Install:_g_dta.dwLanguageID____04x__n
mov dword [0x43080c], eax
call fcn.0040d550
mov edx, dword [0x43080c]
push edx
push str._Locale_to_use_for_UI_____:_g_dta.dwUiLanguageID____04x__n
call fcn.0040d550
mov eax, dword [0x43080c]
mov ecx, dword [0x4305ec]
add esp, 0x10
push edi
push 0x2bc
push 0xc
push eax
call fcn.00413bf0
mov ecx, dword [0x43080c]
push edi
push 0x2bc
push 0xa
push ecx
mov ecx, dword [0x4305ec]
call fcn.00413bf0
mov edx, dword [0x43080c]
mov ecx, dword [0x4305ec]
push edi
push 0x190
push edi
push edx
mov dword [0x430814], eax
call fcn.00413bf0
mov ecx, dword [0x4305ec]
mov dword [0x430810], eax
mov dword [ecx + 0x2b01c], eax
mov edx, dword [0x430814]
mov eax, dword [0x4305ec]
mov dword [eax + 0x2b020], edx
call fcn.00408a80
mov ecx, dword [0x4305f0]
call fcn.00402a40
test eax, eax
je 0x4093a2
push 0x134
call fcn.00414f91
mov esi, eax
add esp, 4
cmp esi, edi
je 0x40933b
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
mov ecx, esi
call fcn.00409d50
mov esi, eax
jmp 0x40933d
xor esi, esi
push 0x46c
call fcn.00414f91
add esp, 4
cmp eax, edi
je 0x409358
push edi
mov ecx, eax
call fcn.00401b00
jmp 0x40935a
xor eax, eax
push 0x6c
push eax
mov ecx, esi
call fcn.00409590
push 0x294
call fcn.00414f91
add esp, 4
cmp eax, edi
je 0x40937f
push edi
mov ecx, eax
call section..text
jmp 0x409381
xor eax, eax
push 0x69
push eax
mov ecx, esi
call fcn.00409590
mov ecx, esi
call fcn.00409cc0
cmp esi, edi
je 0x4093af
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
jmp 0x4093af
push str.No_Project_file_detected..._n
call fcn.0040d550
add esp, 4
mov ecx, dword [0x4305ec]
mov esi, ecx
cmp ecx, edi
je 0x4093c9
call fcn.00412d60
push esi
call fcn.00414f1c
add esp, 4
mov ecx, dword [0x4305e8]
mov esi, ecx
cmp ecx, edi
je 0x4093e3
call fcn.0040a050
push esi
call fcn.00414f1c
add esp, 4
mov esi, dword [esp + 0x18]
cmp esi, edi
je 0x4093fb
mov ecx, esi
call fcn.0040a050
push esi
call fcn.00414f1c
add esp, 4
mov ecx, dword [0x4305f0]
cmp ecx, edi
pop edi
pop ebp
mov esi, ecx
pop ebx
je 0x409418
call fcn.00402a00
push esi
call fcn.00414f1c
add esp, 4
push str.KMSFX__Ended._C_ya__n
call fcn.0040d550
mov ecx, dword [esp + 0xa44]
add esp, 4
pop esi
xor ecx, esp
mov eax, 1
call fcn.004153dc
add esp, 0xa40
ret 0x10