Function at 0x418340
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 0x4183b4
cmp word [ebx], 0
jne 0x4183ad
mov edi, dword [esp + 0x11c]
lea eax, [esp + 0x10]
push eax
push ebx
push 0x80
push edi
call esi
cmp word [ebx], 0
je 0x4187d2
push ebx
push edi
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x41839e
cmp word [eax], 0
je 0x41839e
mov word [eax], 0
push 1
push 0
push ebx
call fcn.0041b190
add esp, 0xc
jmp 0x4183b4
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebp, dword [esp + 0x118]
test ebp, ebp
je 0x4187d2
mov edi, dword [esp + 0x124]
test edi, edi
je 0x4183e2
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 0x418401
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 0x418420
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 0x41843f
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 0x41845e
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 0x41847d
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 0x41849c
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 0x4184bb
lea ecx, [esp + 0x10]
lea edx, [ebp + 0x4670]
push ecx
push eax
push 0x80
push edx
call esi
test edi, edi
je 0x4184d5
lea edi, [ebp + 0x1598]
push edi
call fcn.0041c8c0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [esp + 0x138]
test eax, eax
je 0x4184f2
lea ecx, [esp + 0x10]
push ecx
push eax
push 0x80
push str.Alarm.ini
call esi
test ebx, ebx
je 0x4184fd
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebx, dword [esp + 0x140]
mov esi, dword [esp + 0x12c]
test ebx, ebx
jne 0x418538
mov eax, dword [esp + 0x148]
test eax, eax
jne 0x418538
mov eax, dword [esp + 0x150]
test eax, eax
jne 0x418538
mov eax, dword [esp + 0x15c]
test eax, eax
jne 0x418538
test esi, esi
je 0x4186d7
lea edi, [ebp + 0x19a8]
push 3
push 0x432bf8
push edi
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4185f9
push eax
push 0x440e14
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x4185f2
mov eax, dword [esp + 0x138]
test eax, eax
je 0x4185f2
cmp word [eax], 0
je 0x4185f2
push 0x100
lea ebx, [ebp + 0x1bb0]
push esi
push 0x440e14
push ebx
push edi
call fcn.004187e0
add esp, 0x14
test al, 8
je 0x4185b4
push 0x100
push esi
push 0x440e14
push ebx
push edi
call fcn.004187e0
add esp, 0x14
test eax, 0xfffffffb
push 0
push 0
je 0x4185d5
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.004092e0
add esp, 8
push eax
push esi
push 0xffffffffffffffff
push 0
jmp 0x4185dc
push 0
push esi
push 0xffffffffffffffff
push 7
push 0x325
call fcn.0041e0b0
mov ebx, dword [esp + 0x15c]
add esp, 0x1c
jmp 0x418604
push 0x440e14
jmp 0x4185fa
push edi
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
test esi, esi
je 0x41869e
cmp word [esi], 0
je 0x41869e
push esi
call fcn.0041c8c0
add esp, 4
test ebx, ebx
je 0x41863e
mov edi, dword [esp + 0x120]
push esi
lea eax, [ebp + 0x25dc]
push edi
push eax
push ebx
call fcn.0041d230
add esp, 0x10
jmp 0x418645
mov edi, dword [esp + 0x120]
mov eax, dword [esp + 0x148]
test eax, eax
je 0x418662
push esi
lea ecx, [ebp + 0x23d4]
push edi
push ecx
push eax
call fcn.0041d230
add esp, 0x10
mov eax, dword [esp + 0x150]
test eax, eax
je 0x41867f
push esi
lea edx, [ebp + 0x27e4]
push edi
push edx
push eax
call fcn.0041d230
add esp, 0x10
mov eax, dword [esp + 0x15c]
test eax, eax
je 0x4186d7
push esi
lea ecx, [ebp + 0x4670]
push edi
push ecx
push eax
call fcn.0041d230
add esp, 0x10
jmp 0x4186d7
test ebx, ebx
je 0x4186a7
mov word [ebx], 0
mov eax, dword [esp + 0x148]
test eax, eax
je 0x4186b7
mov word [eax], 0
mov eax, dword [esp + 0x150]
test eax, eax
je 0x4186c7
mov word [eax], 0
mov eax, dword [esp + 0x15c]
test eax, eax
je 0x4186d7
mov word [eax], 0
mov edi, dword [esp + 0x134]
test edi, edi
je 0x4187d2
lea esi, [ebp + 0x1fc4]
push 3
push 0x432bf8
push esi
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4187c7
push eax
push 0x440c0c
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x4187c0
mov eax, dword [esp + 0x138]
test eax, eax
je 0x4187c0
cmp word [eax], 0
je 0x4187c0
push 0x200
lea ebx, [ebp + 0x21cc]
push edi
push 0x440c0c
push ebx
push esi
call fcn.004187e0
add esp, 0x14
test al, 8
je 0x41876a
push 0x200
push edi
push 0x440c0c
push ebx
push esi
call fcn.004187e0
add esp, 0x14
test eax, 0xfffffffb
push 0
push 0
je 0x4187a1
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.004092e0
add esp, 8
push eax
push edi
push 0xffffffffffffffff
push 0
push 0x327
call fcn.0041e0b0
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.0041e0b0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
push 0x440c0c
jmp 0x4187c8
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