Function at 0x403860
Capabilities:
Check if file exists
Create directory
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x44d8
call fcn.0049cdc0
mov eax, dword [0x509380]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x4468], eax
xor edi, edi
mov eax, dword [ebp + 0x10]
push 0x1f4
mov dword [ebp - 0x4474], eax
mov dword [ebp - 0x4454], edi
call fcn.004a0ee2
mov ecx, dword [ebp - 0x4468]
add esp, 4
mov dword [ebp - 0x445c], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4038b3
sub ecx, edx
mov dword [ebp - 0x4464], edi
sar ecx, 1
movzx eax, cx
push 0x4c6798
push esi
mov dword [ebp - 0x4484], eax
mov dword [ebp - 0x428], 0x4035a0
mov dword [ebp - 0x424], 0x4035c0
mov dword [ebp - 0x430], 0x4035a0
mov dword [ebp - 0x42c], 0x4035c0
call fcn.004a6293
add esp, 8
mov dword [ebp - 0x418], eax
test eax, eax
jne 0x403930
call fcn.004a0e50
cmp dword [eax], edi
je 0x403930
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049cd8d
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 0x404000
mov dword [ebp - 0x41c], 0x404050
mov dword [ebp - 0x444c], 0x404210
mov dword [ebp - 0x4448], 0x4042e0
mov dword [ebp - 0x4444], 0x404270
mov dword [ebp - 0x4440], 0x4042c0
mov dword [ebp - 0x443c], eax
mov dword [ebp - 0x4434], edi
mov dword [ebp - 0x4438], edi
call fcn.00408700
lea eax, [ebp - 0x44d8]
push eax
call fcn.00409840
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x444c]
push eax
lea eax, [ebp - 0x44d8]
push eax
call fcn.00405a50
add esp, 0x14
test eax, eax
je 0x4039d5
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x44d8]
push eax
call fcn.004097d0
jmp 0x403e9c
xor edx, edx
mov dword [ebp - 0x4480], 0xffffffff
xor ecx, ecx
mov dword [ebp - 0x4450], edx
mov dword [ebp - 0x447c], edx
mov dword [ebp - 0x4458], ecx
cmp dword [ebp - 0x44bc], ecx
jbe 0x403e3b
mov dword [ebp - 0x4478], edx
nop word [eax + eax]
mov eax, dword [ebp - 0x4498]
mov edi, dword [eax + ecx*4 + 4]
lea esi, [eax + ecx*4]
mov ebx, dword [ebp - 0x44c8]
sub edi, dword [esi]
add ebx, edx
mov dword [ebp - 0x4470], 0
mov dword [ebp - 0x446c], 0
mov dword [ebp - 0x4488], ebx
cmp edi, dword [ebp - 0x4464]
jbe 0x403a87
push dword [ebp - 0x4454]
call fcn.004a0ec7
add esp, 4
mov dword [ebp - 0x4464], edi
add edi, edi
je 0x403e53
push edi
call fcn.004a0ee2
mov edi, eax
add esp, 4
mov dword [ebp - 0x4454], edi
test edi, edi
je 0x403e35
mov edx, dword [esi + 4]
mov ecx, dword [esi]
sub edx, ecx
jmp 0x403a98
mov edx, dword [esi + 4]
mov ecx, dword [esi]
sub edx, ecx
mov edi, dword [ebp - 0x4454]
test edi, edi
je 0x403ac0
mov eax, dword [ebp - 0x4494]
lea esi, [eax + ecx*2]
test edx, edx
je 0x403ac0
mov ecx, edi
sub esi, edi
nop dword [eax]
mov ax, word [esi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x403ab0
cmp byte [ebx + 0x19], 0
jne 0x403b1b
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x446c]
push eax
lea eax, [ebp - 0x4470]
push eax
lea eax, [ebp - 0x447c]
push eax
lea eax, [ebp - 0x4450]
push eax
lea eax, [ebp - 0x4480]
push eax
push dword [ebp - 0x4458]
lea eax, [ebp - 0x444c]
push eax
lea eax, [ebp - 0x44d8]
push eax
call fcn.00409520
add esp, 0x28
test eax, eax
jne 0x403e35
mov esi, dword [ebp - 0x445c]
push 0x1f4
push 0
push esi
call fcn.0049e980
mov ecx, dword [ebp - 0x4468]
mov edx, esi
add esp, 0xc
sub edx, ecx
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x403b40
movzx eax, word [edi]
xor esi, esi
mov ecx, eax
test ax, ax
je 0x403ba5
mov eax, dword [ebp - 0x4484]
mov edx, edi
mov ebx, dword [ebp - 0x445c]
movzx eax, ax
lea edi, [ebx + eax*2]
mov ebx, dword [ebp - 0x4454]
movzx eax, cx
mov ecx, eax
cmp eax, 0x2f
jne 0x403b8a
mov ecx, 0x5c
mov eax, ecx
mov word [edx], ax
inc esi
mov word [edi], cx
movzx eax, word [ebx + esi*2]
lea edx, [ebx + esi*2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x403b76
mov ebx, dword [ebp - 0x4488]
mov esi, dword [ebp - 0x445c]
mov edi, esi
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x403bb0
push 0x208
lea eax, [ebp - 0x20c]
sub edi, ecx
push 0
push eax
sar edi, 1
call fcn.0049e980
push esi
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.004a0e63
add esp, 0x18
xor esi, esi
test edi, edi
js 0x403c46
nop dword [eax]
cmp word [ebp + esi*2 - 0x20c], 0x5c
jne 0x403c41
cmp esi, 0x104
jae 0x403ff7
xor eax, eax
mov word [ebp + esi*2 - 0x20c], ax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x403c34
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x403c46
mov eax, 0x5c
mov word [ebp + esi*2 - 0x20c], ax
inc esi
cmp esi, edi
jle 0x403bf0
cmp byte [ebx + 0x19], 0
jne 0x403de9
mov ebx, dword [ebp - 0x445c]
lea eax, [ebp - 0x4460]
push ebx
push eax
call fcn.00405790
add esp, 8
test eax, eax
je 0x403d86
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0049e980
lea edx, [ebp - 0x20c]
add esp, 0xc
mov ecx, ebx
sub edx, ebx
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x403c90
lea eax, [ebp - 0x20c]
push str..del
push eax
call fcn.0049e199
add esp, 8
test eax, eax
je 0x403cc3
lea eax, [ebp - 0x20c]
jmp 0x403d63
xor esi, esi
nop word [eax + eax]
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.0049e980
add esp, 0xc
lea eax, [ebp - 0x20c]
test esi, esi
jne 0x403d07
push eax
lea eax, [ebp - 0x414]
push str._s.del
push eax
call fcn.004035d0
add esp, 0xc
jmp 0x403d1d
push esi
push eax
lea eax, [ebp - 0x414]
push str._s.del_d
push eax
call fcn.004035d0
add esp, 0x10
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403d47
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x403d47
cmp esi, 0xa
jge 0x403d6e
inc esi
jmp 0x403cd0
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.004a0eed
add esp, 8
lea eax, [ebp - 0x414]
push 5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x4460]
push ebx
push eax
call fcn.00405790
add esp, 8
test eax, eax
jne 0x403e57
mov ebx, dword [ebp - 0x446c]
mov esi, dword [ebp - 0x4460]
test ebx, ebx
je 0x403dce
mov eax, dword [ebp - 0x4470]
add eax, dword [ebp - 0x4450]
push esi
push ebx
push 1
push eax
call fcn.004a71fb
mov edi, eax
add esp, 0x10
cmp edi, ebx
je 0x403dce
push esi
call fcn.004a61b0
add esp, 4
test eax, eax
jne 0x403e6b
cmp edi, ebx
jne 0x403e6b
test esi, esi
je 0x403de9
push esi
call fcn.004a6154
add esp, 4
test eax, eax
jne 0x403e7f
mov dword [ebp - 0x4460], eax
mov ebx, dword [ebp - 0x4474]
test ebx, ebx
je 0x403e07
mov eax, dword [ebp - 0x4458]
mov ecx, ebx
push dword [ebp - 0x44bc]
mov edx, dword [ebx]
inc eax
push eax
call dword [edx]
mov ecx, dword [ebp - 0x4458]
mov edx, dword [ebp - 0x4478]
inc ecx
add edx, 0x20
mov dword [ebp - 0x4458], ecx
mov dword [ebp - 0x4478], edx
cmp ecx, dword [ebp - 0x44bc]
jb 0x403a10
mov edi, dword [ebp - 0x4454]
mov edx, dword [ebp - 0x4450]
mov eax, dword [ebp - 0x424]
push edx
cmp eax, 0x4035c0
jne 0x403e93
call fcn.004a0ec7
add esp, 4
jmp 0x403e9f
xor edi, edi
jmp 0x403e35
push str.can_not_open_output_file
push str._nERROR:__s_n
call fcn.00409c60
add esp, 8
jmp 0x403e2f
push str.can_not_write_output_file
push str._nERROR:__s_n
call fcn.00409c60
add esp, 8
jmp 0x403e2f
push str.can_not_close_output_file
push str._nERROR:__s_n
call fcn.00409c60
add esp, 8
jmp 0x403e2f
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x44a8]
cmp eax, 0x4035c0
jne 0x403ebc
call fcn.004a0ec7
add esp, 4
jmp 0x403ec8
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x44a4]
cmp eax, 0x4035c0
jne 0x403ee5
call fcn.004a0ec7
add esp, 4
jmp 0x403ef1
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x44a0]
cmp eax, 0x4035c0
jne 0x403f0e
call fcn.004a0ec7
add esp, 4
jmp 0x403f1a
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x449c]
cmp eax, 0x4035c0
jne 0x403f37
call fcn.004a0ec7
add esp, 4
jmp 0x403f43
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x4498]
cmp eax, 0x4035c0
jne 0x403f60
call fcn.004a0ec7
add esp, 4
jmp 0x403f6c
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x4494]
cmp eax, 0x4035c0
jne 0x403f89
call fcn.004a0ec7
add esp, 4
jmp 0x403f95
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
lea eax, [ebp - 0x428]
mov dword [ebp - 0x4494], 0
push eax
lea eax, [ebp - 0x44d8]
mov dword [ebp - 0x4490], 0
push eax
call fcn.004098b0
lea eax, [ebp - 0x44d8]
push eax
call fcn.00409840
push edi
call fcn.004a0ec7
mov eax, dword [ebp - 0x418]
add esp, 0x10
test eax, eax
je 0x403fe4
push eax
call fcn.004a6154
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049cd8d
mov esp, ebp
pop ebp
ret
call fcn.0049ccb2
int3