Function at 0x406884
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x43f330]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [ebp + 0xc], ebx
jne 0x406b44
mov dword [0x440a94], eax
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x28], 0x20
mov dword [ebp - 0x2c], 8
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.004067ca
test al, al
je 0x406b36
call fcn.004049b4
test al, al
je 0x406b36
call fcn.00401370
xor edi, edi
inc edi
test al, al
je 0x406a0a
push 0x28
lea eax, [ebp - 0x70]
push ebx
push eax
call fcn.0040b920
mov eax, dword [0x440a94]
add esp, 0xc
push 0x7f00
mov esi, str.LangChooserWindow
push ebx
mov dword [ebp - 0x6c], 0x4012d5
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x4c], esi
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
push ebx
push dword [0x440a94]
mov eax, 0x80000000
push ebx
push ebx
push eax
push eax
push eax
push eax
push eax
push ebx
push esi
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x440a8c], eax
cmp eax, ebx
je 0x406b44
call fcn.0040112c
test eax, eax
jne 0x406967
push 0x46d
jmp 0x406b3b
push 5
push dword [0x440a8c]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x440a8c]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push dword [0x440a8c]
call dword [sym.imp.USER32.dll_SetFocus]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
jmp 0x4069a9
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
push ebx
lea eax, [ebp - 0x48]
push eax
call esi
cmp eax, ebx
jg 0x406995
mov esi, dword [ebp - 0x40]
jge 0x4069bd
xor esi, esi
push ebx
push dword [0x440a8c]
call fcn.0040103c
pop ecx
pop ecx
push dword [0x440a8c]
call dword [sym.imp.USER32.dll_DestroyWindow]
push dword [0x440a8c]
call fcn.004011b3
pop ecx
push dword [0x440a90]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp esi, edi
jne 0x406b44
call fcn.0040112c
test eax, eax
jne 0x406a0a
push 0x494
jmp 0x406b3b
call fcn.00401064
call fcn.004011a4
lea eax, [ebp - 0x20]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.CasinoName
mov dword [ebp - 0xc], 0xf
mov dword [ebp - 0x10], ebx
mov byte [ebp - 0x20], bl
call fcn.0040136b
push ebx
mov ecx, 0x440a98
call fcn.00401294
cmp dword [ebp - 0x10], ebx
jne 0x406a5d
mov esi, str.Casino
push esi
call fcn.00409f10
pop ecx
push eax
push esi
lea ecx, [ebp - 0x20]
call fcn.004010e1
sub esp, 0x1c
lea eax, [ebp - 0x20]
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
call fcn.00401348
call fcn.00401334
add esp, 0x1c
test eax, eax
je 0x406a89
push ebx
push edi
lea ecx, [ebp - 0x20]
call fcn.004012cb
jmp 0x406b44
mov esi, 0x43f19c
push esi
sub esp, 0x1c
lea eax, [ebp - 0x20]
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
call fcn.00401348
call fcn.004013c0
add esp, 0x20
test eax, eax
jne 0x406abc
push 0x4ac
push 2
call fcn.004012da
pop ecx
pop ecx
jmp 0x406a7a
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x24], esp
push esi
call fcn.00401348
call fcn.00401078
add esp, 0x1c
cmp dword [0x43f1b0], 0x10
jb 0x406ae1
mov esi, dword [0x43f19c]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x406af3
push 0x4b5
jmp 0x406ab1
call fcn.0040100a
test eax, eax
jne 0x406b03
push 0x4bd
jmp 0x406ab1
push str.CStart.exe
push str.CSTART
call fcn.00401131
pop ecx
pop ecx
test eax, eax
jne 0x406b1f
push 0x4c3
jmp 0x406ab1
call fcn.0040126c
test eax, eax
jne 0x406a7a
push 0x4d0
jmp 0x406ab1
push 0x457
push 2
call fcn.004012da
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0040abe0
leave
ret 0x10