Function at 0x4040ea
Capabilities:
Create directory
Delete directory
Delete file
Set file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x2d4
mov eax, dword [0x4095d0]
xor eax, ebp
mov dword [ebp + 0x74], eax
push ebx
push esi
push edi
mov esi, 0x409e58
push esi
call sub.MSVCR90.dll_strlen
mov edi, esi
dec edi
push esi
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x24c], edi
call sub.MSVCR90.dll_strlen
cmp byte [eax + edi], 0x5c
pop ecx
pop ecx
je 0x404137
push 0x407794
push esi
call sub.MSVCR90.dll_strcat
pop ecx
pop ecx
push esi
push esi
call dword [sym.imp.USER32.dll_CharToOemA]
push esi
call sub.MSVCR90.dll_strlen
xor ebx, ebx
mov dword [ebp - 0x238], eax
mov eax, dword [0x40a4c4]
pop ecx
mov dword [ebp - 0x240], eax
mov dword [0x409e44], ebx
cmp byte [0x409e3f], bl
je 0x404171
mov dword [0x40ab28], 0xf4240
cmp dword [0x40ab28], ebx
mov dword [ebp - 0x234], ebx
jle 0x40477b
cmp dword [ebp - 0x234], ebx
je 0x404193
push esi
push esi
call dword [sym.imp.USER32.dll_CharToOemA]
call fcn.00403184
cmp dword [0x40a900], ebx
jne 0x404847
cmp byte [0x409e3f], bl
jne 0x40421c
push ebx
push dword [ebp - 0x240]
push dword [0x4091c0]
call dword [sym.imp.KERNEL32.dll__llseek]
mov edi, dword [sym.imp.KERNEL32.dll__lread]
push 0x2e
lea eax, [ebp - 0x22c]
push eax
push dword [0x4091c0]
call edi
movzx ecx, word [ebp - 0x210]
mov eax, dword [ebp - 0x238]
push ecx
lea eax, [eax + 0x409e58]
push eax
push dword [0x4091c0]
call edi
movzx eax, word [ebp - 0x210]
mov ecx, dword [ebp - 0x238]
mov byte [eax + ecx + 0x409e58], bl
cmp byte [0x409e3d], bl
je 0x404285
mov eax, dword [0x40ab1c]
sub dword [ebp - 0x202], eax
jmp 0x404285
call fcn.0040300b
mov eax, dword [0x409e38]
cmp eax, 0xffffffff
je 0x40477b
push ebx
push eax
push dword [0x4091c0]
call dword [sym.imp.KERNEL32.dll__llseek]
mov edi, dword [sym.imp.KERNEL32.dll__lread]
push 0x1e
lea eax, [ebp - 0x1fc]
push eax
push dword [0x4091c0]
call edi
movzx ecx, word [ebp - 0x1e2]
mov eax, dword [ebp - 0x238]
push ecx
lea eax, [eax + 0x409e58]
push eax
push dword [0x4091c0]
call edi
movzx eax, word [ebp - 0x1e2]
mov ecx, dword [ebp - 0x238]
mov byte [eax + ecx + 0x409e58], bl
mov eax, esi
cmp byte [0x409e58], bl
je 0x40429c
cmp byte [eax], 0x2f
jne 0x404297
mov byte [eax], 0x5c
inc eax
cmp byte [eax], bl
jne 0x40428f
push esi
call sub.MSVCR90.dll_strlen
pop ecx
mov ecx, dword [ebp - 0x24c]
cmp byte [eax + ecx], 0x5c
jne 0x4042bf
push esi
call sub.MSVCR90.dll_strlen
pop ecx
mov ecx, dword [ebp - 0x24c]
mov byte [eax + ecx], bl
push esi
push esi
call dword [sym.imp.USER32.dll_OemToCharA]
push esi
push dword [0x40919c]
lea eax, [ebp - 0x1dc]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp byte [0x409e3f], bl
jne 0x404316
mov ecx, dword [0x40ab2c]
cmp ecx, 0xf4240
jle 0x404307
mov eax, ecx
cdq
mov ecx, 0x3e8
idiv ecx
mov ecx, eax
mov eax, dword [0x409e44]
jmp 0x404354
cmp ecx, ebx
je 0x404312
mov eax, dword [0x409e44]
jmp 0x40434e
xor eax, eax
jmp 0x404357
mov ecx, dword [0x40a708]
cmp ecx, ebx
je 0x404370
cmp ecx, 0xf4240
mov eax, dword [0x409e38]
mov edx, dword [0x40ab30]
jle 0x40434c
lea edi, [edx + eax]
mov eax, ecx
cdq
mov ecx, 0x3e8
idiv ecx
mov ecx, eax
mov eax, edi
mov edi, dword [sym.imp.KERNEL32.dll__lread]
jmp 0x404354
add eax, edx
imul eax, eax, 0x3e8
cdq
idiv ecx
lea ecx, [ebp - 0x1dc]
push ecx
push eax
push 0x5f4
push dword [0x40ab18]
call dword [sym.imp.USER32.dll_SendMessageA]
cmp byte [0x409e3f], bl
jne 0x40439e
push ebx
push dword [ebp - 0x202]
push dword [0x4091c0]
call dword [sym.imp.KERNEL32.dll__llseek]
push 0x1e
lea eax, [ebp - 0x1fc]
push eax
push dword [0x4091c0]
call edi
jmp 0x4043b0
push 0x2e
lea eax, [ebp - 0x22c]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov al, byte [0x409e3f]
xor edi, edi
inc edi
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x23c], ebx
cmp al, bl
je 0x4043e6
movzx edx, word [ebp - 0x1e2]
movzx ecx, word [ebp - 0x1e0]
add edx, dword [0x409e38]
lea ecx, [edx + ecx + 0x1e]
mov dword [0x409e38], ecx
mov dword [0x40aa0c], ebx
mov dword [0x409f5c], ebx
cmp al, bl
je 0x404428
test dword [ebp - 0x1f6], 0x1000
jne 0x404431
test byte [ebp - 0x1f6], 1
mov dword [ebp - 0x230], ebx
je 0x40451e
mov dword [ebp - 0x230], edi
push ebx
cmp al, bl
je 0x40445a
push dword [0x409e38]
jmp 0x404473
test byte [ebp - 0x206], 0x10
je 0x404402
push esi
call fcn.0040159c
pop ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [ebp - 0x23c], edi
jmp 0x4046a1
movzx eax, word [ebp - 0x1e0]
movzx ecx, word [ebp - 0x1e2]
add eax, dword [ebp - 0x202]
lea eax, [ecx + eax + 0x1e]
push eax
push dword [0x4091c0]
call dword [sym.imp.KERNEL32.dll__llseek]
push 0xc
lea eax, [ebp + 0x68]
push eax
push dword [0x4091c0]
call dword [sym.imp.KERNEL32.dll__lread]
xor edi, edi
cmp byte [0x40a8c4], bl
je 0x4044b0
push dword [ebp - 0x1ee]
lea eax, [ebp + 0x68]
push eax
call fcn.0040264e
pop ecx
pop ecx
test eax, eax
jne 0x40451b
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x238]
lea eax, [eax + 0x409e58]
push eax
call fcn.00402968
pop ecx
pop ecx
test eax, eax
je 0x4047d9
lea eax, [ebp - 0x74]
push eax
call sub.MSVCR90.dll_strlen
pop ecx
test eax, eax
jbe 0x404517
lea eax, [ebp - 0x74]
push eax
call sub.MSVCR90.dll_strlen
pop ecx
cmp eax, 0x28
jbe 0x4044f0
mov byte [ebp - 0x4c], bl
lea eax, [ebp - 0x74]
push eax
push 0x40a8c4
call sub.MSVCR90.dll_strcpy
push dword [ebp - 0x1ee]
lea eax, [ebp + 0x68]
push eax
call fcn.0040264e
add esp, 0x10
test eax, eax
je 0x404517
xor edi, edi
inc edi
cmp edi, ebx
je 0x4044b0
xor edi, edi
inc edi
cmp byte [0x40a5d0], bl
je 0x404559
push ebx
push esi
call dword [sym.imp.KERNEL32.dll__lopen]
cmp eax, 0xffffffff
je 0x404559
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
call fcn.0040334d
cmp eax, 2
jne 0x4045bb
mov byte [0x40a5d0], bl
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x1ea], ebx
jne 0x40456f
mov dword [0x409e4c], ebx
cmp dword [ebp - 0x1e6], ebx
jne 0x404575
mov dword [0x409e4c], edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x230]
push eax
cmp byte [0x409e3f], bl
je 0x4045ca
push dword [ebp - 0x1e6]
mov ecx, dword [ebp - 0x1ea]
neg eax
sbb eax, eax
and eax, 0xc
sub ecx, eax
push ecx
movzx ecx, word [ebp - 0x1f4]
push ecx
mov ecx, dword [0x409e38]
add eax, ecx
jmp 0x404604
cmp eax, edi
jne 0x40454a
mov dword [ebp - 0x248], ebx
jmp 0x4046a1
push dword [ebp - 0x214]
mov ecx, dword [ebp - 0x218]
movzx edx, word [ebp - 0x1e2]
neg eax
sbb eax, eax
and eax, 0xc
sub ecx, eax
push ecx
movzx ecx, word [ebp - 0x222]
push ecx
movzx ecx, word [ebp - 0x1e0]
add ecx, eax
mov eax, dword [ebp - 0x202]
add edx, ecx
lea eax, [edx + eax + 0x1e]
push eax
push dword [0x4091c0]
push esi
call fcn.00401fcc
add esp, 0x1c
mov dword [ebp - 0x23c], eax
cmp dword [0x40a900], ebx
jne 0x40477e
cmp eax, ebx
je 0x4046a1
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4046a1
lea eax, [ebp - 0x25c]
push eax
cmp byte [0x409e3f], bl
je 0x404664
push dword [ebp - 0x1f2]
push dword [ebp - 0x1f0]
jmp 0x404670
push dword [ebp - 0x220]
push dword [ebp - 0x21e]
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [ebp - 0x254]
push eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov cl, byte [0x409e3f]
cmp cl, bl
je 0x4046f9
mov eax, dword [0x409f5c]
cmp eax, ebx
jne 0x4046db
mov eax, dword [0x409e38]
add eax, dword [ebp - 0x1ea]
mov dword [0x409e38], eax
cmp dword [ebp - 0x230], ebx
je 0x4046f9
cmp eax, 0xc
jl 0x4046f9
sub eax, 0xc
mov dword [0x409e38], eax
jmp 0x4046f9
add dword [0x409e38], eax
cmp dword [ebp - 0x230], ebx
je 0x4046f9
cmp dword [0x409e38], 0xc
jl 0x4046f9
sub dword [0x409e38], 0xc
cmp dword [ebp - 0x23c], ebx
je 0x4047ed
cmp cl, bl
je 0x404715
movzx eax, word [ebp - 0x1f6]
shr eax, 8
jmp 0x40471b
mov eax, dword [ebp - 0x206]
and eax, 0xffffffef
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp byte [0x409e3f], bl
jne 0x404755
movzx ecx, word [ebp - 0x20e]
movzx eax, word [ebp - 0x20c]
add eax, ecx
movzx ecx, word [ebp - 0x210]
add ecx, dword [ebp - 0x240]
lea eax, [ecx + eax + 0x2e]
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x238]
inc dword [ebp - 0x234]
lea eax, [eax + 0x409e58]
mov byte [eax], bl
mov eax, dword [ebp - 0x234]
cmp eax, dword [0x40ab28]
jl 0x404183
xor edi, edi
inc edi
push dword [0x4091c0]
call dword [sym.imp.KERNEL32.dll__lclose]
mov esi, dword [0x4091bc]
push esi
lea eax, [ebp + 0x54]
push str.temp_d.zme
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea eax, [ebp + 0x54]
push eax
dec esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404790
mov eax, dword [ebp - 0x244]
mov byte [eax + 0x409e58], bl
cmp dword [0x40a900], ebx
jne 0x4047d9
push ebx
push edi
push 0x5f5
push dword [0x40ab18]
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp + 0x74]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00405284
add ebp, 0x78
leave
ret
cmp dword [ebp - 0x248], ebx
je 0x404726
push esi
push dword [0x4091a0]
lea eax, [ebp - 0x1dc]
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
push 0x2033
push dword [0x4091a4]
lea eax, [ebp - 0x1dc]
push eax
push dword [0x40ab18]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
je 0x404881
cmp eax, 6
jne 0x404726
dec dword [ebp - 0x234]
jmp 0x404755
push dword [0x409198]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push 0x5f4
push dword [0x40ab18]
call esi
push ebx
push ebx
push 0x5f5
push dword [0x40ab18]
call esi
mov eax, dword [ebp - 0x244]
mov byte [eax + 0x409e58], bl
jmp 0x4047d9
push dword [0x409198]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push 0x5f4
push dword [0x40ab18]
call esi
push ebx
push ebx
push 0x5f5
push dword [0x40ab18]
call esi
mov dword [0x40a900], 1
jmp 0x404870