Function at 0x405a3d
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x954
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push dword [ebp + 0x14]
add esi, 4
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], esi
call fcn.0040da91
test eax, eax
je 0x405ceb
mov edi, 0x104
push edi
lea eax, [ebp - 0x10f]
push ebx
push eax
mov byte [ebp - 0x110], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push ebx
push ebx
push edi
lea eax, [ebp - 0x110]
push eax
push 0xffffffffffffffff
push dword [ebp + 0x10]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x405aad
lea ecx, [ebp - 0x110]
push ecx
call eax
pop ecx
jmp 0x405ab0
or eax, 0xffffffff
cmp eax, ebx
jne 0x405ce2
mov esi, 0x208
push esi
lea eax, [ebp - 0x73e]
push ebx
push eax
mov word [ebp - 0x740], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [ebp - 0x52e]
push ebx
push eax
mov word [ebp - 0x530], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [ebp - 0x94e]
push ebx
push eax
mov word [ebp - 0x950], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [ebp - 0x31e]
push ebx
push eax
mov word [ebp - 0x320], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push dword [ebp + 0x10]
call sub.msvcrt.dll_wcslen
mov esi, eax
mov dword [esp], 0x446134
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax + 1]
cmp eax, edi
pop ecx
jae 0x405b53
push 0x446134
push dword [ebp + 0x10]
lea eax, [ebp - 0x740]
call fcn.0040630d
pop ecx
pop ecx
jmp 0x405b5a
mov word [ebp - 0x740], bx
push dword [ebp + 0x10]
call sub.msvcrt.dll_wcslen
mov esi, eax
mov dword [esp], str.signons2.txt
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax + 1]
cmp eax, edi
pop ecx
jae 0x405b90
push str.signons2.txt
push dword [ebp + 0x10]
lea eax, [ebp - 0x530]
call fcn.0040630d
pop ecx
pop ecx
jmp 0x405b97
mov word [ebp - 0x530], bx
push dword [ebp + 0x10]
call sub.msvcrt.dll_wcslen
mov esi, eax
mov dword [esp], str.signons3.txt
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax + 1]
cmp eax, edi
pop ecx
jae 0x405bcd
push str.signons3.txt
push dword [ebp + 0x10]
lea eax, [ebp - 0x950]
call fcn.0040630d
pop ecx
pop ecx
jmp 0x405bd4
mov word [ebp - 0x950], bx
push dword [ebp + 0x10]
call sub.msvcrt.dll_wcslen
mov esi, eax
mov dword [esp], str.signons.sqlite
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax + 1]
cmp eax, edi
pop ecx
jae 0x405c0a
push str.signons.sqlite
push dword [ebp + 0x10]
lea eax, [ebp - 0x320]
call fcn.0040630d
pop ecx
pop ecx
jmp 0x405c11
mov word [ebp - 0x320], bx
lea eax, [ebp - 0x320]
push eax
xor esi, esi
call fcn.004061ac
test eax, eax
pop ecx
je 0x405c3e
push dword [ebp + 0x14]
lea eax, [ebp - 0x320]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004055e2
jmp 0x405cc1
lea eax, [ebp - 0x740]
push eax
call fcn.004061ac
test eax, eax
pop ecx
je 0x405c66
push 0xa
lea eax, [ebp - 0x740]
push eax
push dword [ebp + 0xc]
xor esi, esi
push dword [ebp + 8]
inc esi
call fcn.00405803
lea eax, [ebp - 0x530]
push eax
call fcn.004061ac
test eax, eax
pop ecx
je 0x405c8e
push 0x14
lea eax, [ebp - 0x530]
push eax
push dword [ebp + 0xc]
xor esi, esi
push dword [ebp + 8]
inc esi
call fcn.00405803
lea eax, [ebp - 0x950]
push eax
call fcn.004061ac
test eax, eax
pop ecx
je 0x405cb6
push 0x1e
lea eax, [ebp - 0x950]
push eax
push dword [ebp + 0xc]
xor esi, esi
push dword [ebp + 8]
inc esi
call fcn.00405803
cmp esi, ebx
jne 0x405cc1
mov dword [ebp - 4], 3
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
cmp eax, ebx
je 0x405ccd
call eax
mov esi, dword [ebp - 8]
cmp dword [esi], ebx
je 0x405cf2
lea eax, [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [esi], ebx
jmp 0x405cf2
mov dword [ebp - 4], 2
jmp 0x405cd0
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10