Function at 0x418010
Capabilities:
Set current directory

Disassembly:
sub esp, 0x104
push ebx
mov ebx, dword [esp + 0x114]
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push edi
test ebx, ebx
je 0x418084
cmp word [ebx], 0
jne 0x41807d
mov edi, dword [esp + 0x11c]
lea eax, [esp + 0x10]
push eax
push ebx
push 0x80
push edi
call esi
cmp word [ebx], 0
je 0x4184a2
push ebx
push edi
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x41806e
cmp word [eax], 0
je 0x41806e
mov word [eax], 0
push 1
push 0
push ebx
call fcn.00438460
add esp, 0xc
jmp 0x418084
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebp, dword [esp + 0x118]
test ebp, ebp
je 0x4184a2
mov edi, dword [esp + 0x124]
test edi, edi
je 0x4180b2
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x1598]
push ecx
push edi
push 0x80
push edx
call esi
mov eax, dword [esp + 0x128]
test eax, eax
je 0x4180d1
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x17a0]
push ecx
push eax
push 0x80
push edx
call esi
mov eax, dword [esp + 0x130]
test eax, eax
je 0x4180f0
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x1db8]
push ecx
push eax
push 0x80
push edx
call esi
mov eax, dword [esp + 0x13c]
test eax, eax
je 0x41810f
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x25dc]
push ecx
push eax
push 0x80
push edx
call esi
mov eax, dword [esp + 0x144]
test eax, eax
je 0x41812e
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x23d4]
push ecx
push eax
push 0x80
push edx
call esi
mov eax, dword [esp + 0x14c]
test eax, eax
je 0x41814d
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x27e4]
push ecx
push eax
push 0x80
push edx
call esi
mov eax, dword [esp + 0x154]
test eax, eax
je 0x41816c
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x29ec]
push ecx
push eax
push 0x80
push edx
call esi
mov eax, dword [esp + 0x158]
test eax, eax
je 0x41818b
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x4670]
push ecx
push eax
push 0x80
push edx
call esi
test edi, edi
je 0x4181a5
lea edi, [ebp + 0x1598]
push edi
call fcn.00439b70
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [esp + 0x138]
test eax, eax
je 0x4181c2
lea ecx, [esp + 0x10]
push ecx
push eax
push 0x80
push str.Alarm.ini
call esi
test ebx, ebx
je 0x4181cd
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebx, dword [esp + 0x140]
mov esi, dword [esp + 0x12c]
test ebx, ebx
jne 0x418208
mov eax, dword [esp + 0x148]
test eax, eax
jne 0x418208
mov eax, dword [esp + 0x150]
test eax, eax
jne 0x418208
mov eax, dword [esp + 0x15c]
test eax, eax
jne 0x418208
test esi, esi
je 0x4183a7
lea edi, [ebp + 0x19a8]
push 3
push 0x458290
push edi
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4182c9
push eax
push 0x464f08
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x4182c2
mov eax, dword [esp + 0x138]
test eax, eax
je 0x4182c2
cmp word [eax], 0
je 0x4182c2
push 0x100
lea ebx, [ebp + 0x1bb0]
push esi
push 0x464f08
push ebx
push edi
call fcn.004184b0
add esp, 0x14
test al, 8
je 0x418284
push 0x100
push esi
push 0x464f08
push ebx
push edi
call fcn.004184b0
add esp, 0x14
test eax, 0xfffffffb
push 0
push 0
je 0x4182a5
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.00408fd0
add esp, 8
push eax
push esi
push 0xffffffffffffffff
push 0
jmp 0x4182ac
push 0
push esi
push 0xffffffffffffffff
push 7
push 0x325
call fcn.00426440
mov ebx, dword [esp + 0x15c]
add esp, 0x1c
jmp 0x4182d4
push 0x464f08
jmp 0x4182ca
push edi
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
test esi, esi
je 0x41836e
cmp word [esi], 0
je 0x41836e
push esi
call fcn.00439b70
add esp, 4
test ebx, ebx
je 0x41830e
mov edi, dword [esp + 0x120]
push esi
lea eax, [ebp + 0x25dc]
push edi
push eax
push ebx
call fcn.0043a4d0
add esp, 0x10
jmp 0x418315
mov edi, dword [esp + 0x120]
mov eax, dword [esp + 0x148]
test eax, eax
je 0x418332
push esi
lea ecx, [ebp + 0x23d4]
push edi
push ecx
push eax
call fcn.0043a4d0
add esp, 0x10
mov eax, dword [esp + 0x150]
test eax, eax
je 0x41834f
push esi
lea edx, [ebp + 0x27e4]
push edi
push edx
push eax
call fcn.0043a4d0
add esp, 0x10
mov eax, dword [esp + 0x15c]
test eax, eax
je 0x4183a7
push esi
lea ecx, [ebp + 0x4670]
push edi
push ecx
push eax
call fcn.0043a4d0
add esp, 0x10
jmp 0x4183a7
test ebx, ebx
je 0x418377
mov word [ebx], 0
mov eax, dword [esp + 0x148]
test eax, eax
je 0x418387
mov word [eax], 0
mov eax, dword [esp + 0x150]
test eax, eax
je 0x418397
mov word [eax], 0
mov eax, dword [esp + 0x15c]
test eax, eax
je 0x4183a7
mov word [eax], 0
mov edi, dword [esp + 0x134]
test edi, edi
je 0x4184a2
lea esi, [ebp + 0x1fc4]
push 3
push 0x458290
push esi
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x418497
push eax
push 0x464d00
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x418490
mov eax, dword [esp + 0x138]
test eax, eax
je 0x418490
cmp word [eax], 0
je 0x418490
push 0x200
lea ebx, [ebp + 0x21cc]
push edi
push 0x464d00
push ebx
push esi
call fcn.004184b0
add esp, 0x14
test al, 8
je 0x41843a
push 0x200
push edi
push 0x464d00
push ebx
push esi
call fcn.004184b0
add esp, 0x14
test eax, 0xfffffffb
push 0
push 0
je 0x418471
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.00408fd0
add esp, 8
push eax
push edi
push 0xffffffffffffffff
push 0
push 0x327
call fcn.00426440
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
push 0
push edi
push 0xffffffffffffffff
push 7
push 0x327
call fcn.00426440
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
push 0x464d00
jmp 0x418498
push esi
push edi
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret