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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x44d8
call fcn.0049ec30
mov eax, dword [0x50c380]
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.004a2eb2
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 0x403d63
sub ecx, edx
mov dword [ebp - 0x4464], edi
sar ecx, 1
movzx eax, cx
push 0x4c9798
push esi
mov dword [ebp - 0x4484], eax
mov dword [ebp - 0x428], 0x403a50
mov dword [ebp - 0x424], 0x403a70
mov dword [ebp - 0x430], 0x403a50
mov dword [ebp - 0x42c], 0x403a70
call fcn.004a8263
add esp, 8
mov dword [ebp - 0x418], eax
test eax, eax
jne 0x403de0
call fcn.004a2e20
cmp dword [eax], edi
je 0x403de0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049ec00
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 0x4044b0
mov dword [ebp - 0x41c], 0x404500
mov dword [ebp - 0x444c], 0x4046c0
mov dword [ebp - 0x4448], 0x404790
mov dword [ebp - 0x4444], 0x404720
mov dword [ebp - 0x4440], 0x404770
mov dword [ebp - 0x443c], eax
mov dword [ebp - 0x4434], edi
mov dword [ebp - 0x4438], edi
call fcn.00408c20
lea eax, [ebp - 0x44d8]
push eax
call fcn.00409d50
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.00405f30
add esp, 0x14
test eax, eax
je 0x403e85
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x44d8]
push eax
call fcn.00409ce0
jmp 0x40434c
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 0x4042eb
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 0x403f37
push dword [ebp - 0x4454]
call fcn.004a2e97
add esp, 4
mov dword [ebp - 0x4464], edi
add edi, edi
je 0x404303
push edi
call fcn.004a2eb2
mov edi, eax
add esp, 4
mov dword [ebp - 0x4454], edi
test edi, edi
je 0x4042e5
mov edx, dword [esi + 4]
mov ecx, dword [esi]
sub edx, ecx
jmp 0x403f48
mov edx, dword [esi + 4]
mov ecx, dword [esi]
sub edx, ecx
mov edi, dword [ebp - 0x4454]
test edi, edi
je 0x403f70
mov eax, dword [ebp - 0x4494]
lea esi, [eax + ecx*2]
test edx, edx
je 0x403f70
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 0x403f60
cmp byte [ebx + 0x19], 0
jne 0x403fcb
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.00409a30
add esp, 0x28
test eax, eax
jne 0x4042e5
mov esi, dword [ebp - 0x445c]
push 0x1f4
push 0
push esi
call fcn.004a0950
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 0x403ff0
movzx eax, word [edi]
xor esi, esi
mov ecx, eax
test ax, ax
je 0x404055
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 0x40403a
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 0x404026
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 0x404060
push 0x208
lea eax, [ebp - 0x20c]
sub edi, ecx
push 0
push eax
sar edi, 1
call fcn.004a0950
push esi
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.004a2e33
add esp, 0x18
xor esi, esi
test edi, edi
js 0x4040f6
nop dword [eax]
cmp word [ebp + esi*2 - 0x20c], 0x5c
jne 0x4040f1
cmp esi, 0x104
jae 0x4044a7
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 0x4040e4
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4040f6
mov eax, 0x5c
mov word [ebp + esi*2 - 0x20c], ax
inc esi
cmp esi, edi
jle 0x4040a0
cmp byte [ebx + 0x19], 0
jne 0x404299
mov ebx, dword [ebp - 0x445c]
lea eax, [ebp - 0x4460]
push ebx
push eax
call fcn.00405c70
add esp, 8
test eax, eax
je 0x404236
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004a0950
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 0x404140
lea eax, [ebp - 0x20c]
push str..del
push eax
call fcn.004a0169
add esp, 8
test eax, eax
je 0x404173
lea eax, [ebp - 0x20c]
jmp 0x404213
xor esi, esi
nop word [eax + eax]
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004a0950
add esp, 0xc
lea eax, [ebp - 0x20c]
test esi, esi
jne 0x4041b7
push eax
lea eax, [ebp - 0x414]
push str._s.del
push eax
call fcn.00403a80
add esp, 0xc
jmp 0x4041cd
push esi
push eax
lea eax, [ebp - 0x414]
push str._s.del_d
push eax
call fcn.00403a80
add esp, 0x10
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4041f7
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4041f7
cmp esi, 0xa
jge 0x40421e
inc esi
jmp 0x404180
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.004a2ebd
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.00405c70
add esp, 8
test eax, eax
jne 0x404307
mov ebx, dword [ebp - 0x446c]
mov esi, dword [ebp - 0x4460]
test ebx, ebx
je 0x40427e
mov eax, dword [ebp - 0x4470]
add eax, dword [ebp - 0x4450]
push esi
push ebx
push 1
push eax
call fcn.004a91cb
mov edi, eax
add esp, 0x10
cmp edi, ebx
je 0x40427e
push esi
call fcn.004a8180
add esp, 4
test eax, eax
jne 0x40431b
cmp edi, ebx
jne 0x40431b
test esi, esi
je 0x404299
push esi
call fcn.004a8124
add esp, 4
test eax, eax
jne 0x40432f
mov dword [ebp - 0x4460], eax
mov ebx, dword [ebp - 0x4474]
test ebx, ebx
je 0x4042b7
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 0x403ec0
mov edi, dword [ebp - 0x4454]
mov edx, dword [ebp - 0x4450]
mov eax, dword [ebp - 0x424]
push edx
cmp eax, 0x403a70
jne 0x404343
call fcn.004a2e97
add esp, 4
jmp 0x40434f
xor edi, edi
jmp 0x4042e5
push str.can_not_open_output_file
push str._nERROR:__s_n
call fcn.0040a170
add esp, 8
jmp 0x4042df
push str.can_not_write_output_file
push str._nERROR:__s_n
call fcn.0040a170
add esp, 8
jmp 0x4042df
push str.can_not_close_output_file
push str._nERROR:__s_n
call fcn.0040a170
add esp, 8
jmp 0x4042df
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x44a8]
cmp eax, 0x403a70
jne 0x40436c
call fcn.004a2e97
add esp, 4
jmp 0x404378
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x44a4]
cmp eax, 0x403a70
jne 0x404395
call fcn.004a2e97
add esp, 4
jmp 0x4043a1
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x44a0]
cmp eax, 0x403a70
jne 0x4043be
call fcn.004a2e97
add esp, 4
jmp 0x4043ca
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x449c]
cmp eax, 0x403a70
jne 0x4043e7
call fcn.004a2e97
add esp, 4
jmp 0x4043f3
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x4498]
cmp eax, 0x403a70
jne 0x404410
call fcn.004a2e97
add esp, 4
jmp 0x40441c
lea ecx, [ebp - 0x428]
push ecx
call eax
add esp, 8
mov eax, dword [ebp - 0x424]
push dword [ebp - 0x4494]
cmp eax, 0x403a70
jne 0x404439
call fcn.004a2e97
add esp, 4
jmp 0x404445
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.00409dc0
lea eax, [ebp - 0x44d8]
push eax
call fcn.00409d50
push edi
call fcn.004a2e97
mov eax, dword [ebp - 0x418]
add esp, 0x10
test eax, eax
je 0x404494
push eax
call fcn.004a8124
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049ec00
mov esp, ebp
pop ebp
ret
call fcn.0049eb23
int3