Function at 0x1004a430
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100856d8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.100236e0
lea esi, [eax + 0x10]
mov dword [ebp - 0x30], esi
mov edx, esi
mov byte [ebp - 4], 1
call fcn.100394f0
add esi, 0xfffffff0
mov byte [ebp - 4], 0
or ebx, 0xffffffff
mov eax, ebx
lea ecx, [esi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1004a4a0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.10021470
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x1004a4bc
push 0x80004005
call fcn.10021340
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
call fcn.10021470
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x1004a4e9
push 0x80004005
call fcn.10021340
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
test byte [ebp - 0x10], 2
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
push 4
je 0x1004a518
push str.Save
call fcn.10023530
push 4
push str.Save
jmp 0x1004a529
push str.Open
call fcn.10023530
push 4
push str.Open
lea ecx, [ebp - 0x14]
call fcn.10023530
push 0x1008fa88
lea ecx, [ebp - 0x28]
xor esi, esi
call fcn.10022bb0
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 6
test byte [0x100b2d34], 8
je 0x1004a566
or dword [ebp - 0x10], 4
cmp dword [edi], 4
lea eax, [ebp - 0x20]
jb 0x1004a58b
push dword [edi + 0x54]
push dword [edi + 0x34]
push dword [ebp + 8]
push str._s:_lpofn__flags0x_x__lpofn__FlagsEx0x_x
push eax
call fcn.1003a800
add esp, 0x14
mov byte [ebp - 4], 7
jmp 0x1004a5a3
push dword [edi + 0x34]
push dword [ebp + 8]
push str._s:_lpofn__flags0x_x
push eax
call fcn.1003a800
add esp, 0x10
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x20]
call fcn.100394f0
mov byte [ebp - 4], 6
mov ecx, ebx
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a5cb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi + 0x34]
mov ecx, 2
test al, 2
cmovne esi, ecx
mov dword [ebp - 0x24], esi
test eax, 0x200
je 0x1004a5eb
or esi, 0x200
mov dword [ebp - 0x24], esi
test al, 0x20
je 0x1004a62f
push dword [ebp + 8]
lea eax, [ebp - 0x20]
push str._s:_contains_OFN_ENABLEHOOK
push eax
call fcn.1003a800
add esp, 0xc
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x20]
call fcn.100394f0
mov byte [ebp - 4], 6
mov ecx, ebx
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a62f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
lea edx, [ebp - 0x50]
call fcn.10049ec0
add esp, 4
lea eax, [ebp - 0x44]
push eax
push 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x50]
push eax
push ecx
mov ecx, dword [ebp - 0x28]
mov esi, esp
add ecx, 0xfffffff0
mov dword [ebp - 0x20], esp
call fcn.100236e0
add eax, 0x10
mov dword [esi], eax
push ecx
mov byte [ebp - 4], 0xa
mov ecx, esp
mov dword [ebp - 0x34], esp
push dword [edi + 0x1c]
call fcn.10022bb0
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x14]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x38], esp
mov ecx, eax
mov dword [ebp - 0x2c], eax
mov esi, esp
call fcn.100236e0
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
push ecx
mov ecx, eax
mov dword [ebp - 0x30], eax
mov esi, esp
call fcn.100236e0
push dword [ebp - 0x24]
mov edx, dword [ebp - 0x10]
add eax, 0x10
mov dword [esi], eax
xor ecx, ecx
mov byte [ebp - 4], 6
call fcn.1004b230
mov ecx, eax
add esp, 0x24
cmp ecx, 0x800704d5
jne 0x1004a6d9
mov esi, 2
jmp 0x1004a8ea
xor eax, eax
test ecx, ecx
setns al
mov dword [ebp - 0x10], eax
test eax, eax
je 0x1004a89a
cmp dword [edi + 0x1c], 0
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x18], eax
je 0x1004a74b
mov eax, dword [ebp - 0x40]
mov esi, dword [ebp - 0x44]
sub eax, esi
sar eax, 2
test eax, eax
je 0x1004a74b
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.100236e0
mov edx, dword [edi + 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [esi]
mov esi, dword [eax - 0xc]
lea ecx, [esi + 1]
cmp edx, ecx
jl 0x1004a725
lea edx, [esi + 1]
push edx
push eax
push dword [edi + 0x1c]
call fcn.1006cc7b
mov edx, dword [ebp - 0x24]
add esp, 0xc
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a74b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x1004a83e
push ecx
mov ecx, esp
mov esi, 0x5c
push eax
call fcn.10022bb0
mov edx, esi
lea ecx, [ebp - 0x24]
call fcn.1003a970
add esp, 4
mov byte [ebp - 4], 0xd
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edx, dword [edi + 0x1c]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004a786
sub ecx, esi
sar ecx, 1
mov word [edi + 0x38], cx
test cx, cx
je 0x1004a7b8
mov edi, edi
movzx ecx, word [edi + 0x38]
cmp word [edx + ecx*2 - 2], 0x5c
je 0x1004a7b8
lea eax, [ecx - 1]
mov word [edi + 0x38], ax
test ax, ax
jne 0x1004a7a0
mov ecx, edx
lea esi, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004a7c0
sub ecx, esi
sar ecx, 1
mov word [edi + 0x3a], cx
test cx, cx
je 0x1004a7f8
jmp 0x1004a7e0
movzx ecx, word [edi + 0x3a]
cmp word [edx + ecx*2 - 2], 0x2e
je 0x1004a7f8
lea eax, [ecx - 1]
mov word [edi + 0x3a], ax
test ax, ax
jne 0x1004a7e0
movzx eax, word [edi + 0x3a]
push ecx
mov ecx, esp
push eax
movzx eax, word [edi + 0x38]
push eax
push dword [ebp + 8]
push str._s:_nFileOffset_d__nFileExt_d
push ecx
call fcn.1003a800
add esp, 0x14
call fcn.10021810
mov byte [ebp - 4], 6
add esp, 4
mov edx, dword [ebp - 0x24]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a83e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [edi + 0x1c]
test ecx, ecx
je 0x1004a897
mov edx, dword [edi + 0x2c]
test edx, edx
je 0x1004a870
mov esi, dword [ebp - 0x10]
push ecx
mov eax, esp
push edx
push ecx
push esi
push dword [ebp + 8]
push str._s:_Ret_d__file_s__initialDir_s
push eax
call fcn.1003a800
add esp, 0x18
call fcn.10021810
add esp, 4
jmp 0x1004a8de
test ecx, ecx
je 0x1004a897
mov esi, dword [ebp - 0x10]
push ecx
mov eax, esp
push ecx
push esi
push dword [ebp + 8]
push str._s:_Ret_d__file_s
push eax
call fcn.1003a800
add esp, 0x14
call fcn.10021810
add esp, 4
jmp 0x1004a8de
mov eax, dword [ebp - 0x10]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x24]
push str._s:_Ret_d
push eax
call fcn.1003a800
add esp, 0x10
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x24]
call fcn.100394f0
mov byte [ebp - 4], 6
mov ecx, ebx
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a8db
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
xor eax, eax
test esi, esi
sete al
mov dword [ebp - 0x20], eax
mov esi, eax
lea ecx, [ebp - 0x44]
call fcn.1003f390
lea ecx, [ebp - 0x50]
call fcn.1003f390
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a91a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x2c]
mov ecx, ebx
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a937
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, ebx
mov edx, dword [ebp - 0x30]
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1004a954
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp + 8]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x1004a975
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4