Function at 0x403360
Capabilities:
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x40a7fe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
mov eax, dword [0x40d0f0]
push ebx
push ebp
xor ebx, ebx
push esi
mov ebp, 0xf
mov dword [esp + 0x90], eax
push edi
mov dword [esp + 0x90], ebp
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], bl
mov dword [esp + 0xa0], ebx
mov dword [esp + 0x58], ebp
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
mov edx, dword [esp + 0xb0]
mov eax, edx
mov byte [esp + 0xa0], 1
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4033e7
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x28]
call fcn.00401d80
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1b]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x38]
push eax
mov byte [esp + 0xbc], 2
call fcn.00402d60
mov eax, dword [esp + 0x54]
mov edi, 0x10
add esp, 0x1c
cmp eax, edi
mov byte [esp + 0xa0], 1
jb 0x403453
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0040406d
add esp, 4
cmp dword [esp + 0x10], ebx
jne 0x403463
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x58], edi
mov eax, dword [esp + 0x44]
jae 0x403471
lea eax, [esp + 0x44]
push eax
push str._s_save.ini
push 0x40e160
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x2c]
push edx
call fcn.004028e0
add esp, 0x10
cmp dword [eax + 0x18], edi
mov byte [esp + 0xa0], 3
jb 0x4034a1
mov edx, dword [eax + 4]
jmp 0x4034a4
lea edx, [eax + 4]
mov eax, edx
mov dword [esp + 0x74], ebp
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4034b5
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x64]
call fcn.00401d80
cmp dword [esp + 0x38], edi
mov byte [esp + 0xa0], 5
jb 0x4034e4
mov eax, dword [esp + 0x24]
push eax
call fcn.0040406d
add esp, 4
cmp dword [esp + 0x74], edi
mov eax, dword [esp + 0x60]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
jae 0x4034fe
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x200
push 0x40d960
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push ebx
push 0x40d960
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
cmp eax, ebx
je 0x40352c
mov word [eax + 2], bx
call fcn.004031f0
call fcn.00401050
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x58], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x80]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.004019b0
call fcn.004027d0
add esp, 0x1c
cmp eax, ebx
mov dword [0x40e564], eax
jne 0x4035c7
cmp dword [esp + 0x74], edi
jb 0x40357c
mov eax, dword [esp + 0x60]
push eax
call fcn.0040406d
add esp, 4
cmp dword [esp + 0x58], edi
mov dword [esp + 0x74], ebp
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
jb 0x40359b
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0040406d
add esp, 4
cmp dword [esp + 0x90], edi
mov dword [esp + 0x58], ebp
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
jb 0x4035bd
mov edx, dword [esp + 0x7c]
push edx
call fcn.0040406d
add esp, 4
mov eax, 0xffffff88
jmp 0x40366d
mov edx, dword [eax]
push ebx
mov ecx, eax
call dword [edx]
cmp dword [esp + 0x58], edi
mov edx, dword [esp + 0x44]
jae 0x4035dc
lea edx, [esp + 0x44]
cmp dword [esp + 0x90], edi
mov eax, dword [esp + 0x7c]
jae 0x4035ed
lea eax, [esp + 0x7c]
mov ebp, dword [esp + 0x18]
mov ecx, dword [0x40e564]
mov esi, dword [ecx]
push 1
push ebp
mov ebp, dword [esp + 0x24]
push str.p_n_b
push ebp
mov ebp, dword [esp + 0x20]
push ebp
push edx
push eax
call dword [esi + 8]
mov esi, eax
cmp dword [esp + 0x74], edi
jb 0x403625
mov eax, dword [esp + 0x60]
push eax
call fcn.0040406d
add esp, 4
cmp dword [esp + 0x58], edi
mov ebp, 0xf
mov dword [esp + 0x74], ebp
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
jb 0x403649
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0040406d
add esp, 4
cmp dword [esp + 0x90], edi
mov dword [esp + 0x58], ebp
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
jb 0x40366b
mov edx, dword [esp + 0x7c]
push edx
call fcn.0040406d
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x94]
call fcn.004040a3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x10