Function at 0x40159c
Capabilities:
Create directory
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x47b2b4]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
and dword [ebp - 4], 0
push 7
pop ecx
lea edi, [ebp - 0x28]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x24]
mov edi, eax
mov ebx, edx
imul edi, edi, 0x4008
imul ebx, ebx, 0x4008
mov ecx, section..ndata
add edi, ecx
add ebx, ecx
lea ecx, [ebp - 0x24]
mov dword [0x40a0e4], ecx
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffffe
cmp ecx, 0x44
ja case.0x4015f6.67
jmp dword [ecx*4 + 0x402c6c]
push 0
push eax
call fcn.00404a73
mov eax, 0x7fffffff
jmp case.0x4015f6.2
inc dword [0x473274]
cmp dword [ebp - 8], 0
je 0x401605
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x401605
push eax
call fcn.0040137c
dec eax
push 0
push eax
call fcn.0040139b
jmp case.0x4015f6.2
push 0
push eax
call fcn.00404a73
jmp case.0x4015f6.67
xor ecx, ecx
call fcn.00401446
cmp eax, 1
jg 0x401655
xor eax, eax
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp case.0x4015f6.67
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp case.0x4015f6.67
shl eax, 2
cmp dword [ebp - 0x1c], 0
jne 0x40169b
mov ecx, dword [eax + 0x47b360]
mov dword [eax + 0x47b320], ecx
xor ecx, ecx
inc ecx
call fcn.00401446
mov ecx, dword [ebp - 0x24]
mov dword [ecx*4 + 0x47b360], eax
jmp case.0x4015f6.67
mov ecx, dword [eax + 0x47b320]
mov dword [eax + 0x47b360], ecx
jmp case.0x4015f6.67
mov edx, dword [ebp - 0x1c]
lea edx, [edx*4 + 0x47b360]
mov ecx, dword [edx]
xor eax, eax
test ecx, ecx
sete al
and ecx, dword [ebp - 0x18]
mov dword [edx], ecx
mov eax, dword [ebp + eax*4 - 0x24]
jmp case.0x4015f6.2
push dword [edx*4 + 0x47b360]
jmp 0x402c52
mov ecx, dword [0x473280]
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
test ecx, ecx
je 0x4016f0
push edx
push ecx
call esi
mov eax, dword [ebp - 0x24]
mov ecx, dword [0x47326c]
test ecx, ecx
je case.0x4015f6.67
push eax
push ecx
call esi
jmp case.0x4015f6.67
push 0xfffffffffffffff0
pop esi
call fcn.0040145c
push dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne case.0x4015f6.67
mov dword [ebp - 4], 1
jmp case.0x4015f6.67
push 0xfffffffffffffff0
pop esi
call fcn.0040145c
mov ebx, eax
push ebx
call fcn.00405807
mov esi, eax
test esi, esi
je 0x401786
push 0x5c
push esi
call fcn.004057b3
mov esi, eax
movzx edi, word [esi]
xor eax, eax
push eax
push ebx
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40177c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401779
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x40177c
inc dword [ebp - 4]
mov word [esi], di
inc esi
inc esi
test di, di
jne 0x401743
cmp dword [ebp - 0x20], 0
je 0x4017aa
push 0xffffffffffffffe6
call fcn.00401435
push ebx
push 0x4d40b0
call fcn.00405ab8
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp case.0x4015f6.67
push 0xfffffffffffffff5
call fcn.00401435
jmp case.0x4015f6.67
xor esi, esi
call fcn.0040145c
push eax
call fcn.00405b98
test eax, eax
je 0x401b90
mov eax, dword [ebp - 0x20]
jmp case.0x4015f6.2
push 0xffffffffffffffd0
pop esi
call fcn.0040145c
push 0xffffffffffffffdf
pop esi
mov edi, eax
call fcn.0040145c
push 0x13
pop esi
mov ebx, eax
call fcn.0040145c
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x4017ff
push 0xffffffffffffffe3
jmp 0x4017ac
cmp dword [ebp - 0x1c], 0
je 0x401721
push edi
call fcn.00405b98
test eax, eax
je 0x401721
push ebx
push edi
call fcn.00406526
push 0xffffffffffffffe4
jmp 0x4017ac
xor esi, esi
call fcn.0040145c
mov esi, eax
lea eax, [ebp + 8]
push eax
push ebx
push 0x2004
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x401865
mov eax, dword [ebp + 8]
cmp eax, esi
jbe 0x401871
cmp word [eax], 0
je 0x401871
push esi
call fcn.00405b98
test eax, eax
je 0x401865
add eax, 0x2c
push eax
push dword [ebp + 8]
call fcn.00405ab8
jmp 0x401871
xor eax, eax
mov word [ebx], ax
mov dword [ebp - 4], 1
cmp dword [ebp - 0x1c], 0
jne case.0x4015f6.67
push 0x2004
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
jmp case.0x4015f6.67
or esi, 0xffffffff
call fcn.0040145c
lea ecx, [ebp + 8]
push ecx
push edi
push 0x2004
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
jne case.0x4015f6.67
xor eax, eax
mov dword [ebp - 4], 1
mov word [edi], ax
jmp case.0x4015f6.67
push 0xffffffffffffffef
pop esi
call fcn.0040145c
push eax
push edi
call fcn.0040592d
jmp 0x401719
push 0x31
pop esi
call fcn.0040145c
mov esi, eax
mov eax, dword [ebp - 0x24]
and eax, 7
push esi
mov dword [ebp - 0xc], esi
mov dword [ebp + 8], eax
call fcn.004057d2
push esi
mov esi, 0x40a0e8
test eax, eax
je 0x401905
push esi
call fcn.00405ab8
jmp 0x40191c
push 0x4d40b0
push esi
call fcn.00405ab8
push eax
call fcn.00405fe6
push eax
call sub.KERNEL32.dll_lstrcatW
push esi
call fcn.00405ae7
mov edi, 0x4120f8
mov ebx, section..ndata
cmp dword [ebp + 8], 3
jl 0x401963
push esi
call fcn.00405b98
xor ecx, ecx
test eax, eax
je 0x40194e
lea ecx, [ebp - 0x18]
push ecx
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
mov ecx, eax
mov eax, dword [ebp + 8]
add eax, 0xfffffffd
or eax, 0x80000000
and eax, ecx
neg eax
sbb eax, eax
inc eax
mov dword [ebp + 8], eax
cmp dword [ebp + 8], 0
jne 0x40196f
push esi
call fcn.004058de
xor eax, eax
cmp dword [ebp + 8], 1
setne al
inc eax
push eax
push 0x40000000
push esi
call fcn.004058fe
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x4019f8
cmp dword [ebp + 8], 0
jne 0x4019da
push ebx
push edi
call fcn.00405ab8
push esi
push ebx
call fcn.00405ab8
push dword [ebp - 0x10]
push 0x40e0f0
call fcn.004060ca
push edi
push ebx
call fcn.00405ab8
mov eax, dword [ebp - 0x24]
sar eax, 3
push eax
push 0x40e0f0
call fcn.0040574d
sub eax, 4
je 0x40192c
dec eax
je 0x4019ed
push esi
push 0xfffffffffffffffa
jmp 0x401600
push dword [ebp - 0xc]
push 0xffffffffffffffe2
call fcn.00404a73
cmp dword [ebp + 8], 2
jmp 0x40171b
inc dword [0x47b368]
jmp 0x402c61
push dword [ebp - 0xc]
push 0xffffffffffffffea
call fcn.00404a73
inc dword [0x47b394]
xor edi, edi
push edi
push edi
push dword [ebp - 8]
push dword [ebp - 0x1c]
call fcn.00402ee7
dec dword [0x47b394]
cmp dword [ebp - 0x18], 0xffffffff
mov ebx, eax
jne 0x401a2b
cmp dword [ebp - 0x14], 0xffffffff
je 0x401a3a
lea eax, [ebp - 0x18]
push eax
push edi
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, edi
jge case.0x4015f6.67
cmp ebx, 0xfffffffe
jne 0x401a63
push 0xffffffffffffffe9
push esi
call fcn.004060ca
push dword [ebp - 0xc]
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x401a6b
push 0xffffffffffffffee
push esi
call fcn.004060ca
push 0x200010
push esi
call fcn.0040574d
jmp 0x401605
xor esi, esi
call fcn.0040145c
push dword [ebp - 0x20]
push eax
call fcn.00406559
jmp case.0x4015f6.67
push 0x31
pop esi
call fcn.0040145c
push dword [ebp - 0x24]
push eax
call fcn.0040574d
test eax, eax
je 0x401721
cmp eax, dword [ebp - 0x1c]
jne 0x401ab6
mov eax, dword [ebp - 0x18]
jmp case.0x4015f6.2
cmp eax, dword [ebp - 0x14]
jne case.0x4015f6.67
mov eax, dword [ebp - 0x10]
jmp case.0x4015f6.2
push 0xfffffffffffffff0
pop esi
jmp 0x401a7d
xor esi, esi
inc esi
call fcn.0040145c
push eax
call sub.KERNEL32.dll_lstrlenW
jmp 0x402c51
push 2
pop ecx
call fcn.00401446
push 3
pop ecx
mov dword [ebp + 8], eax
call fcn.00401446
xor esi, esi
inc esi
mov ebx, eax
call fcn.0040145c
mov esi, eax
xor eax, eax
mov word [edi], ax
cmp dword [ebp - 0x1c], eax
je 0x401b11
cmp dword [ebp + 8], eax
je case.0x4015f6.67
push esi
call sub.KERNEL32.dll_lstrlenW
test ebx, ebx
jge 0x401b23
add ebx, eax
js case.0x4015f6.67
cmp ebx, eax
jle 0x401b29
mov ebx, eax
lea eax, [esi + ebx*2]
push eax
push edi
call fcn.00405ab8
mov esi, dword [ebp + 8]
test esi, esi
je case.0x4015f6.67
jge 0x401b51
push edi
call sub.KERNEL32.dll_lstrlenW
add esi, eax
jns 0x401b51
and dword [ebp + 8], 0
mov esi, dword [ebp + 8]
cmp esi, 0x2004
jge case.0x4015f6.67
xor eax, eax
mov word [edi + esi*2], ax
jmp case.0x4015f6.67
push 0x20
pop esi
call fcn.0040145c
push 0x31
pop esi
mov edi, eax
call fcn.0040145c
cmp dword [ebp - 0x14], 0
push eax
push edi
jne 0x401b98
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x401aae
mov eax, dword [ebp - 0x1c]
jmp case.0x4015f6.2
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
jmp 0x401b88
xor esi, esi
inc esi
call fcn.0040145c
push 0x2004
mov ebx, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x401bcd
cmp dword [ebp - 0x1c], 0
je 0x401bd5
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x401bd5
xor eax, eax
mov dword [ebp - 4], esi
mov word [edi], ax
xor eax, eax
mov word [edi + 0x4006], ax
jmp case.0x4015f6.67
xor ecx, ecx
call fcn.00401446
xor ecx, ecx
inc ecx
mov esi, eax
call fcn.00401446
cmp dword [ebp - 0x10], 0
jne 0x401c0c
cmp esi, eax
jl 0x401aae
jle 0x401b90
mov eax, dword [ebp - 0x14]
jmp case.0x4015f6.2
cmp esi, eax
jb 0x401aae
jbe 0x401b90
jmp 0x401c04
xor ebx, ebx
inc ebx
mov ecx, ebx
call fcn.00401446
push 2
pop ecx
mov esi, eax
call fcn.00401446
mov ecx, eax
mov eax, dword [ebp - 0x18]
cmp eax, 0xc
ja case.default.0x401c3a
jmp dword [eax*4 + 0x402d80]
add esi, ecx
jmp case.default.0x401c3a
sub esi, ecx
jmp case.default.0x401c3a
imul ecx, esi
mov esi, ecx
jmp case.default.0x401c3a
test ecx, ecx
je 0x401c5b
mov eax, esi
cdq
idiv ecx
jmp 0x401c75
xor esi, esi
mov dword [ebp - 4], ebx
jmp case.default.0x401c3a
or esi, ecx
jmp case.default.0x401c3a
and esi, ecx
jmp case.default.0x401c3a
xor esi, ecx
jmp case.default.0x401c3a
xor eax, eax
test esi, esi
sete al
mov esi, eax
jmp case.default.0x401c3a
test esi, esi
jne 0x401c81
test ecx, ecx
je 0x401c89
mov esi, ebx
jmp case.default.0x401c3a
test esi, esi
jne 0x401c7d
xor esi, esi
jmp case.default.0x401c3a
test ecx, ecx
je 0x401c5b
mov eax, esi
cdq
idiv ecx
mov esi, edx
jmp case.default.0x401c3a
shl esi, cl
jmp case.default.0x401c3a
sar esi, cl
push esi
jmp 0x402c52
xor esi, esi
inc esi
call fcn.0040145c
push 2
pop ecx
mov esi, eax
call fcn.00401446
push eax
push esi
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp case.0x4015f6.67
mov eax, dword [ebp - 0x1c]
mov esi, dword [0x40a0e0]
test eax, eax
je 0x401d26
dec eax
test esi, esi
je 0x401ce5
mov esi, dword [esi]
test eax, eax
jne 0x401cd6
test esi, esi
jne 0x401cf9
push 0x200010
push 0xffffffffffffffe8
push 0
call fcn.004060ca
push eax
jmp 0x401a71
lea edi, [esi + 4]
push edi
mov esi, 0x40a0e8
push esi
call fcn.00405ab8
mov eax, dword [0x40a0e0]
add eax, 4
push eax
push edi
call fcn.00405ab8
mov eax, dword [0x40a0e0]
push esi
add eax, 4
push eax
jmp 0x402a25
test edx, edx
je 0x401d49
test esi, esi
je 0x401721
lea eax, [esi + 4]
push eax
push edi
call fcn.00405ab8
mov eax, dword [esi]
mov dword [0x40a0e0], eax
push esi
jmp 0x402139
push 0x400c
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push dword [ebp - 0x24]
mov esi, eax
lea eax, [esi + 4]
push eax
call fcn.004060ca
mov eax, dword [0x40a0e0]
mov dword [esi], eax
mov dword [0x40a0e0], esi
jmp case.0x4015f6.67
push 3
pop ecx
call fcn.00401446
push 4
pop ecx
mov dword [ebp - 8], eax
call fcn.00401446
test byte [ebp - 0x10], 1
mov dword [ebp + 8], eax
je 0x401d9d
push 0x33
pop esi
call fcn.0040145c
mov dword [ebp - 8], eax
test byte [ebp - 0x10], 2
je 0x401dae
push 0x44
pop esi
call fcn.0040145c
mov dword [ebp + 8], eax
cmp dword [ebp - 0x28], 0x21
jne 0x401dff
xor ecx, ecx
inc ecx
call fcn.00401446
push 2
pop ecx
mov esi, eax
call fcn.00401446
mov ecx, dword [ebp - 0x10]
sar ecx, 2
test ecx, ecx
je 0x401def
lea edx, [ebp - 0xc]
push edx
push ecx
push 0
push dword [ebp + 8]
push dword [ebp - 8]
push eax
push esi
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 4], eax
jmp 0x401e34
push dword [ebp + 8]
push dword [ebp - 8]
push eax
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x401e31
xor esi, esi
inc esi
call fcn.0040145c
push 0x12
pop esi
mov ebx, eax
call fcn.0040145c
movzx ecx, word [eax]
neg ecx
sbb ecx, ecx
and ecx, eax
movzx eax, word [ebx]
neg eax
push ecx
sbb eax, eax
invalid