Function at 0x404703
Capabilities:
Set current directory

Disassembly:
pop edi
push ebp
mov ebp, esp
sub esp, 0x78
xor eax, dword [0x412370]
mov eax, dword [0x40d5d0]
mov dword [ebp - 0x10], eax
mov eax, dword [0x40d6dc]
or dword [0x417e59], 0x49bb
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 0xf89c8538
mov eax, dword [0x412368]
and dword [0x41abde], eax
mov dword [ebp - 0x14], 0xf89c853b
mov eax, dword [ebp - 0xc]
xor dword [0x4235cf], 0x412378
push ebx
push esi
and dword [0x417e55], 0x7bf9
push edi
mov esi, 0x7510859
sub eax, esi
add dword [0x4235d7], 0x4e22
mov edi, 0x32729f
or dword [0x4235d7], 0x5629
add eax, edi
mov dword [ebp - 0x20], eax
movzx eax, word [0x412370]
and dword [0x415111], eax
mov dword [ebp - 0x28], 0xf89cb538
dec eax
mov dword [ebp - 0x34], 0xf89f0538
mov dword [ebp - 0x2c], 0xf89c85f8
add dword [0x41abd2], edx
jmp 0x404924
mov dword [ebp - 0x24], 0xf89c85d8
mov eax, dword [ebp - 0xc]
sbb dword [0x417e59], 0x417e51
sub eax, esi
sub dword [0x41abde], 0x4235cb
jmp 0x404abd
add eax, edi
mov dword [ebp - 0x18], eax
and dword [0x4235cb], 0
jmp 0x404adc
mov eax, dword [0x4235cb]
inc eax
mov dword [0x4235cb], eax
cmp dword [0x4235cb], 0x1e
jae 0x404b28
cmp dword [0x4235cb], 6
jne 0x404b01
push str.QUF_V802H_3
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
cmp dword [0x4235cb], 5
jne 0x404b19
mov eax, dword [0x4235cb]
inc eax
mov dword [0x4235cb], eax
jmp 0x404ad1
mov dword [ebp - 0x1c], 0xf89c853f
mov byte [ebp - 1], 0x57
sub dword [0x417e59], edi
mov eax, dword [ebp - 0xc]
sub eax, esi
and dword [0x415115], 0x5145
add eax, edi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
sub eax, esi
adc dword [0x41abde], 0x3f71
add eax, edi
and dword [0x4235cf], 0x352e
push eax
dec eax
mov eax, dword [ebp - 0x28]
sub eax, esi
and dword [0x4235c3], 0x41abce
add eax, edi
xor dword [0x41abda], 0x41237c
push eax
and dword [0x4235cf], 0x41abe2
mov eax, dword [ebp - 0x1c]
jmp 0x404d0c
xor eax, esi
neg dword [0x415105]
add eax, edi
xor dword [0x412364], 0x39b1
push eax
lea eax, [ebp - 0x78]
push eax
mov dword [0x41237c], 0x6752
push dword [ebp - 0xc]
sub dword [0x415111], 0x1b2b
push dword [ebp - 0x14]
sub dword [0x4235c7], 0x412364
call fcn.00409363
inc dword [0x415119]
or eax, eax
mov dword [0x4235c7], 0x71ec
je 0x404de0
sub dword [0x417e59], 0x4235db
lea eax, [ebp - 0x78]
neg dword [0x4235cf]
push eax
add eax, dword [0x4235db]
mov eax, dword [ebp - 0x14]
and dword [0x417e59], 0xd95
sub eax, esi
add eax, edi
and dword [0x417e3d], 0x71b6
push eax
mov eax, dword [ebp - 0x10]
add eax, 0xaa
push eax
and dword [0x41abd2], 0x17f4
mov eax, dword [ebp - 0x10]
sub dword [0x417e55], 0x41236c
mov eax, dword [eax + 0x198]
push dword [eax]
add dword [0x417e55], 0x417e3d
call fcn.0040ae4d
mov dword [0x41abd6], 0x35a
mov dword [ebp - 8], eax
mov dword [0x412368], 0x764e
cmp dword [ebp - 8], 0
not dword [0x412364]
lea eax, [ebp + 4]
mov dword [ebp - 0x20], eax
je 0x405842
lea eax, [ebp - 0x18]
jmp 0x404f7c
and dword [0x4235bf], 0
jmp 0x404f96
mov eax, dword [0x4235bf]
inc eax
mov dword [0x4235bf], eax
cmp dword [0x4235bf], 0x1e
jae 0x404fbf
cmp dword [0x4235bf], 0x22
jne 0x404fb9
push dword [ebp - 0x28]
call dword [sym.imp.COMDLG32.DLL_GetSaveFileNameA]
jmp 0x404f8b
mov eax, dword [ebp - 0x2c]
adc dword [0x412354], 0x412370
sub eax, esi
add eax, edi
and dword [0x415115], 0x3c83
jmp 0x405153
push eax
mov dword [0x412358], 0x10
cmp dword [0x412358], 0
je 0x4051ab
cmp dword [0x412358], 4
jne 0x405183
push 0x4150fd
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
cmp dword [0x412358], 5
jne 0x40519b
mov eax, dword [0x412358]
dec eax
mov dword [0x412358], eax
mov eax, dword [0x412358]
dec eax
mov dword [0x412358], eax
jmp 0x40515e
mov eax, dword [ebp - 0x1c]
sub eax, esi
add eax, edi
jmp 0x40532b
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x14]
jmp 0x4054b2
call 0x409606
or eax, eax
je 0x4054e4
lea eax, [ebp - 0x78]
push eax
mov eax, dword [ebp - 0x14]
sub eax, esi
add eax, edi
push eax
mov eax, dword [ebp - 0x10]
add eax, 0xee
push eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x198]
push dword [eax]
call fcn.0040ae4c
mov ecx, dword [ebp - 0x1c]
sub ecx, esi
mov eax, 0xffcd8d61
sbb eax, ecx
sub eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
add ecx, eax
mov eax, dword [ebp - 8]
jmp 0x405674
mov dword [eax + 1], ecx
mov al, byte [ebp - 1]
mov ecx, dword [ebp - 8]
xor al, 0x4a
sub al, 0x34
mov byte [ecx], al
lea eax, [ebp - 8]
inc byte [eax]
inc eax
push eax
pop ecx
dec ecx
xchg ecx, edx
jmp 0x405807
dec byte [edx]
push dword [ebp - 0x10]
mov eax, dword [0x40d68c]
mov eax, dword [eax]
push dword [eax]
lea eax, [0x40d6a8]
push dword [eax]
lea eax, [0x40d454]
push dword [eax]
lea eax, [0x40d688]
push dword [eax]
lea eax, [0x40d784]
add eax, 0x40d784
push dword [eax]
xchg ebx, edx
inc ebx
inc ebx
sub ebx, 3
push ebx
pop eax
call dword [eax + 1]
mov eax, dword [ebp - 0x20]
jmp 0x4059bd
inc ebp
loopne 0x40582e
je 0x405848
add byte [eax], al
mov word [edx + ebx*8 + 0x33], es
fidiv dword [ecx + 0x8615985]
or al, 0x32
add byte [esp + eax*2 - 0x4e25cc26], cl
test dword [ecx + 0x61], ebx
or byte [edx + esi], cl
dec ebp
iretd
mov ecx, dword [0x40d64c]
add dword [eax], ecx
pop edi
pop esi
pop ebx
leave
ret