Function at 0x408960
Capabilities:
Create directory
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x268
mov eax, dword [0x43200c]
mov edi, dword [ebp + 8]
mov esi, edx
mov ebx, ecx
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 4]
test eax, eax
jne 0x408996
mov eax, dword [ebx]
test eax, eax
mov byte [ebp - 0x25d], 1
jne 0x4089bc
mov eax, dword [edi + 4]
jmp 0x4089a1
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x408af5
mov ecx, dword [ebx]
movzx eax, word [eax + ecx*2]
cmp ax, 0x5c
setne cl
test ax, ax
setne al
and al, cl
mov byte [ebp - 0x25d], al
mov eax, dword [esi + 4]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x26c], ebx
mov dword [ebp - 0x268], esi
test al, 0x10
je 0x408a69
cmp eax, 0xffffffff
je 0x408a69
bt eax, 0xa
jb 0x408a69
mov ecx, dword [esi]
cmp ecx, 1
je 0x408a69
cmp eax, 0xffffffff
je 0x408a69
cmp ecx, 2
je 0x408a69
mov ecx, esi
mov edx, ebx
push edi
call fcn.00409480
add esp, 4
test eax, eax
je 0x408b16
cmp dword [ebp + 0x10], 1
jne 0x408a1e
cmp eax, 2
je 0x408b16
xor ecx, ecx
cmp eax, 1
mov esi, 0x80004005
cmove esi, ecx
mov edx, dword [ebp - 0x268]
cmp dword [edx + 8], 0xffffffff
je 0x408a60
mov eax, dword [edx + 4]
cmp eax, 0xffffffff
setne cl
test al, 0x10
je 0x408a60
cmp eax, 0xffffffff
je 0x408a60
mov edx, dword [edx]
cmp edx, 2
je 0x408a60
cmp edx, 1
je 0x408a60
shr eax, 0xa
and al, cl
je 0x408f91
test esi, esi
mov eax, 0x80004005
jmp 0x408adb
mov ecx, esi
mov edx, edi
call fcn.004097e0
mov ecx, dword [esi + 4]
mov edi, eax
cmp ecx, 0xffffffff
setne dl
cmp ecx, 0xffffffff
je 0x408a9c
mov eax, dword [esi]
cmp eax, 2
je 0x408a9c
cmp eax, 1
je 0x408a9c
shr ecx, 0xa
xor eax, eax
and cl, dl
mov ecx, 0
je 0x408aaa
mov ecx, ebx
mov edx, esi
call fcn.004096f0
test eax, eax
setns cl
test cl, cl
mov esi, edi
cmovne esi, eax
test edi, edi
cmovns esi, eax
test eax, eax
cmovs esi, eax
or byte [ebp - 0x25d], cl
jne 0x408ade
mov ecx, dword [ebp - 0x26c]
mov edx, dword [ebp - 0x268]
push 0
call fcn.00408630
add esp, 4
test esi, esi
cmovns esi, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040dec1
mov eax, esi
add esp, 0x268
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebx]
mov byte [ebp - 0x25d], 1
cmp edx, dword [edi]
ja 0x4089bc
push edx
push ecx
push eax
call fcn.00416b48
add esp, 0xc
jmp 0x408986
xor eax, eax
lea ecx, [ebp - 0x228]
mov edx, ebx
mov dword [ebp - 0x264], 0
mov dword [ecx], eax
mov dword [ebp - 0x230], eax
mov dword [ecx + 4], eax
mov dword [ebp - 0x22c], eax
call fcn.00408890
test eax, eax
js 0x408b8f
mov ecx, dword [ebp - 0x228]
test ecx, ecx
je 0x408b8f
mov edi, dword [ebp - 0x224]
dec ecx
movzx eax, word [edi + ecx*2]
cmp ax, 0x5c
je 0x408b69
cmp ax, 0x2f
jne 0x408ef0
cmp dword [ebp - 0x228], ecx
jb 0x408b54
test edi, edi
mov dword [ebp - 0x228], ecx
je 0x408b81
mov word [edi + ecx*2], 0
test ecx, ecx
jne 0x408b4e
mov esi, 0x80004005
jmp 0x408f82
test eax, eax
js 0x409158
push 0x20a
call fcn.0040d784
add esp, 4
xor edi, edi
mov ebx, eax
add eax, 2
push 0x208
push edi
push eax
call fcn.0040fdd0
add esp, 0xc
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x238], edi
mov edi, ebx
mov word [ebx], 0
push ebx
push dword [ebp - 0x264]
push dword [ebp - 0x224]
call fcn.0040c2c0
add esp, 0xc
mov esi, 0x80004005
test eax, eax
je 0x409149
push edi
call fcn.00416709
add esp, 4
test eax, eax
mov dword [ebp - 0x238], eax
je 0x409149
mov ebx, dword [ebp - 0x268]
mov eax, dword [ebx + 8]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x408c1e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 8], 0xffffffff
mov dword [ebp - 0x270], edi
push edi
mov edi, dword [ebp - 0x26c]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x409194
mov eax, dword [ebp + 0xc]
add eax, 0x80
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4091c9
mov ebx, dword [ebp - 0x268]
mov edx, edi
mov ecx, ebx
push 0
call fcn.00409340
add esp, 4
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
je 0x4091aa
mov ecx, dword [ebx + 4]
cmp ecx, 0xffffffff
setne dl
test cl, 0x10
je 0x4091ad
cmp ecx, 0xffffffff
je 0x4091ad
mov edi, dword [ebp - 0x268]
mov edi, dword [edi]
cmp edi, 2
je 0x4091ad
cmp edi, 1
je 0x4091ad
mov edi, dword [ebp + 0xc]
shr ecx, 0xa
and cl, dl
jne 0x4091ad
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x26c]
push edi
call fcn.00409480
add esp, 4
cmp eax, 1
jne 0x409273
xor ebx, ebx
lea edi, [ebp - 0x24c]
xor eax, eax
lea edx, [ebp - 0x238]
dec ebx
mov dword [edi], 2
mov ecx, edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
push eax
call fcn.00409340
add esp, 4
cmp dword [edi + 8], ebx
mov esi, 0x80004005
je 0x4092fa
mov eax, dword [ebp - 0x248]
cmp eax, 0xffffffff
setne cl
test al, 0x10
je 0x4092fa
cmp eax, 0xffffffff
je 0x4092fa
mov edx, dword [ebp - 0x24c]
cmp edx, 2
je 0x4092fa
cmp edx, 1
je 0x4092fa
shr eax, 0xa
and al, cl
jne 0x4092fa
mov esi, 0x20a
push esi
call fcn.0040d784
add esp, 4
mov edi, eax
add eax, 2
mov ecx, 0x208
xor ebx, ebx
push ecx
push ebx
push eax
call fcn.0040fdd0
add esp, 0xc
mov dword [ebp - 0x250], edi
mov dword [ebp - 0x254], ebx
mov word [edi], bx
push esi
call fcn.0040d784
add esp, 4
mov edi, eax
add eax, 2
mov ecx, 0x208
push ecx
push ebx
push eax
call fcn.0040fdd0
add esp, 0xc
mov dword [ebp - 0x258], edi
mov word [edi], bx
lea edi, [ebp - 0x220]
mov dword [ebp - 0x25c], ebx
mov ecx, edi
push dword [ebp - 0x270]
call fcn.0040c0d0
call fcn.00413fcc
mov dword [eax], ebx
push edi
call fcn.0040c130
add esp, 4
test eax, eax
je 0x409281
mov edx, dword [ebp - 0x240]
mov ecx, dword [ebp - 0x23c]
mov edi, eax
xor ebx, ebx
mov dword [ebp - 0x264], edx
mov dword [ebp - 0x274], ecx
push 0x42d062
push edi
call fcn.004166a7
add esp, 8
test eax, eax
je 0x408e42
push 0x42d060
push edi
call fcn.004166a7
add esp, 8
test eax, eax
je 0x408e42
cmp dword [ebp - 0x264], 0
je 0x408e5c
push dword [ebp - 0x274]
push edi
call fcn.004166a7
add esp, 8
test eax, eax
jne 0x408e5c
lea eax, [ebp - 0x220]
push eax
call fcn.0040c130
add esp, 4
mov edi, eax
test eax, eax
jne 0x408e02
jmp 0x409281
push edi
push dword [ebp - 0x270]
push 0x42cb46
push 0x105
lea eax, [ebp - 0x254]
push eax
call fcn.004096b0
add esp, 0x14
cmp dword [ebp - 0x254], 0
jne 0x408e91
test ebx, ebx
mov eax, 0x8007006f
cmovns ebx, eax
jmp 0x408e42
push edi
mov eax, dword [ebp - 0x26c]
push dword [eax + 4]
push 0x42cb46
push 0x105
lea eax, [ebp - 0x25c]
push eax
call fcn.004096b0
add esp, 0x14
cmp dword [ebp - 0x25c], 0
je 0x408e85
lea ecx, [ebp - 0x254]
lea edx, [ebp - 0x25c]
push dword [ebp + 0xc]
call fcn.00409830
add esp, 4
test ebx, ebx
mov ecx, eax
cmovs ecx, ebx
test eax, eax
cmovs ebx, ecx
call fcn.00413fcc
mov dword [eax], 0
jmp 0x408e42
push 0x2f
push edi
call fcn.0040fff1
add esp, 8
mov ebx, eax
push 0x5c
push edi
call fcn.0040fff1
add esp, 8
cmp ebx, eax
mov esi, 0x80004005
cmova eax, ebx
test eax, eax
je 0x408f82
add eax, 2
lea ecx, [ebp - 0x230]
mov edx, eax
call fcn.00407ac0
test eax, eax
mov dword [ebp - 0x264], 0
js 0x4091e2
mov eax, dword [ebp - 0x230]
test eax, eax
je 0x4091e2
mov ecx, dword [ebp - 0x228]
lea edx, [eax + 1]
cmp ecx, edx
jb 0x408f82
not eax
add eax, ecx
cmp ecx, eax
jb 0x408f6d
test edi, edi
mov dword [ebp - 0x228], eax
je 0x408f6b
mov word [edi + eax*2], 0
mov ecx, eax
test ecx, ecx
je 0x408f82
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x264], eax
jmp 0x408b97
mov dword [ebp - 0x264], 0
jmp 0x4091e2
mov eax, dword [ebp - 0x26c]
lea edi, [ebp - 0x220]
mov ecx, edi
push dword [eax + 4]
call fcn.0040c0d0
call fcn.00413fcc
mov dword [eax], 0
push edi
call fcn.0040c130
add esp, 4
test eax, eax
je 0x409162
mov edi, eax
push 0x42d062
push edi
call fcn.004166a7
add esp, 8
test eax, eax
je 0x409005
push 0x42d060
push edi
call fcn.004166a7
add esp, 8
test eax, eax
je 0x409005
mov eax, dword [ebp - 0x268]
cmp dword [eax + 0xc], 0
je 0x409023
push dword [eax + 0x10]
push edi
call fcn.004166a7
add esp, 8
test eax, eax
jne 0x409023
mov ebx, esi
lea eax, [ebp - 0x220]
push eax
call fcn.0040c130
add esp, 4
mov edi, eax
test eax, eax
mov esi, ebx
jne 0x408fc5
jmp 0x409164
push 0x20a
call fcn.0040d784
add esp, 4
mov ebx, eax
add eax, 2
push 0x208
xor ecx, ecx
push ecx
push eax
call fcn.0040fdd0
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x224], ebx
mov word [ebx], 0
mov dword [ebp - 0x228], eax
push edi
mov eax, dword [ebp - 0x26c]
xor edi, edi
push dword [eax + 4]
push 0x42cb46
push 0x105
lea ebx, [ebp - 0x228]
push ebx
call fcn.004096b0
add esp, 0x14
cmp dword [ebp - 0x228], edi
je 0x409117
xor eax, eax
mov dword [ebp - 0x24c], 2
lea ecx, [ebp - 0x24c]
mov edx, ebx
dec eax
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x23c], edi
push edi
call fcn.00409340
add esp, 4
mov ecx, ebx
lea edx, [ebp - 0x24c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00408960
add esp, 0xc
mov ebx, eax
test esi, esi
cmovs ebx, esi
call fcn.00413fcc
mov dword [eax], edi
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], edi
test eax, eax
je 0x409100
push eax
call fcn.0040d78d
add esp, 4
mov eax, dword [ebp - 0x244]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x409123
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x409123
test esi, esi
mov eax, 0x8007006f
cmovns esi, eax
mov ebx, esi
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x224], 0
test eax, eax
je 0x409007
push eax
call fcn.0040d78d
add esp, 4
jmp 0x409007
mov dword [ebp - 0x264], 0
jmp 0x4091d9
mov esi, 0x80004005
jmp 0x4091e2
mov ebx, esi
call fcn.00413fcc
cmp dword [eax], 0
mov eax, dword [ebp - 0x220]
mov esi, 0x80004005
cmove esi, ebx
test ebx, ebx
cmovs esi, ebx
cmp eax, 0xffffffff
je 0x408ade
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x408ade
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x4091c9
xor eax, eax
dec eax
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x4091bc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x268]
mov dword [eax + 8], 0xffffffff
mov dword [ebp - 0x264], 0
mov edi, dword [ebp - 0x270]
push edi
call fcn.0040d78d
add esp, 4
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x22c], 0
test eax, eax
je 0x4091ff
push eax
call fcn.0040d78d
add esp, 4
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x224], 0
test eax, eax
je 0x40921c
push eax
call fcn.0040d78d
add esp, 4
cmp byte [ebp - 0x264], 0
setne al
or byte [ebp - 0x25d], al
jne 0x40924e
mov edi, dword [ebp - 0x26c]
mov edx, dword [ebp - 0x268]
mov ecx, edi
push edi
call fcn.00408630
add esp, 4
cmp dword [edi], 0
je 0x408ade
mov ecx, dword [ebp - 0x268]
cmp dword [ecx + 8], 0xffffffff
jne 0x408a2b
mov edx, dword [ebp - 0x26c]
push 0
call fcn.00409340
add esp, 4
jmp 0x408a2b
mov eax, dword [ebp - 0x268]
mov eax, dword [eax + 8]
jmp 0x4091ad
call fcn.00413fcc
cmp dword [eax], 0
mov edi, 0x80004005
lea ecx, [ebp - 0x238]
lea edx, [ebp - 0x24c]
cmove edi, ebx
test ebx, ebx
cmovs edi, ebx
call fcn.004096f0
mov esi, eax
mov eax, dword [ebp - 0x220]
test edi, edi
cmovs esi, edi
cmp eax, 0xffffffff
je 0x4092c0
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x258]
mov dword [ebp - 0x258], 0
test eax, eax
je 0x4092dd
push eax
call fcn.0040d78d
add esp, 4
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x250], 0
test eax, eax
je 0x4092fa
push eax
call fcn.0040d78d
add esp, 4
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], 0
test eax, eax
je 0x409317
push eax
call fcn.0040d78d
add esp, 4
mov eax, dword [ebp - 0x244]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40932c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov dword [ebp - 0x264], eax
jmp 0x4091d3