Function at 0x40a370
Capabilities:
Create directory
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x268
mov eax, dword [0x43300c]
mov ebx, dword [ebp + 8]
mov esi, edx
mov edi, ecx
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 4]
test eax, eax
jne 0x40a3a6
mov eax, dword [edi]
test eax, eax
mov byte [ebp - 0x230], 1
jne 0x40a3cc
mov eax, dword [ebx + 4]
jmp 0x40a3b1
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x40a4e8
mov ecx, dword [edi]
movzx eax, word [eax + ecx*2]
cmp ax, 0x5c
setne cl
test ax, ax
setne al
and al, cl
mov byte [ebp - 0x230], al
mov eax, dword [esi + 4]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x238], edi
cmp eax, 0xffffffff
je 0x40a462
mov ecx, eax
and ecx, 0x10
je 0x40a462
test eax, 0x400
jne 0x40a462
mov eax, dword [esi]
dec eax
cmp eax, 1
jbe 0x40a462
mov eax, edx
mov ecx, esi
mov edx, edi
push eax
call fcn.0040af20
add esp, 4
test eax, eax
je 0x40a509
cmp dword [ebp + 0x10], 1
jne 0x40a41d
cmp eax, 2
je 0x40a509
xor ecx, ecx
cmp eax, 1
mov edi, 0x80004005
cmove edi, ecx
cmp dword [esi + 8], 0xffffffff
je 0x40a459
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
setne cl
test al, 0x10
je 0x40a459
cmp eax, 0xffffffff
je 0x40a459
mov edx, dword [esi]
cmp edx, 2
je 0x40a459
cmp edx, 1
je 0x40a459
shr eax, 0xa
and al, cl
je 0x40a684
test edi, edi
mov eax, 0x80004005
jmp 0x40a4ce
mov ecx, esi
call fcn.0040b2b0
mov ecx, dword [esi + 4]
mov ebx, eax
cmp ecx, 0xffffffff
setne dl
cmp ecx, 0xffffffff
je 0x40a493
mov eax, dword [esi]
cmp eax, 2
je 0x40a493
cmp eax, 1
je 0x40a493
shr ecx, 0xa
xor eax, eax
and cl, dl
mov ecx, 0
je 0x40a4a1
mov ecx, edi
mov edx, esi
call fcn.0040b1b0
test eax, eax
setns cl
test cl, cl
mov edi, ebx
cmovne edi, eax
test ebx, ebx
cmovns edi, eax
test eax, eax
cmovs edi, eax
or byte [ebp - 0x230], cl
jne 0x40a4d1
mov ecx, dword [ebp - 0x238]
mov edx, esi
push 0
call fcn.0040a000
add esp, 4
test edi, edi
cmovns edi, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e271
mov eax, edi
add esp, 0x268
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [edi]
mov byte [ebp - 0x230], 1
cmp edx, dword [ebx]
ja 0x40a3cc
push edx
push ecx
push eax
call fcn.00416f81
add esp, 0xc
jmp 0x40a396
lea ecx, [ebp - 0x228]
mov edx, edi
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x260], 0
call fcn.0040a270
test eax, eax
js 0x40a590
mov ebx, dword [ebp - 0x228]
test ebx, ebx
je 0x40a590
mov ecx, dword [ebp - 0x228]
mov edi, dword [ebp - 0x224]
lea eax, [ebx - 1]
jmp 0x40a561
dec eax
movzx edx, word [edi + eax*2]
cmp dx, 0x5c
je 0x40a571
cmp dx, 0x2f
jne 0x40a5a9
cmp ebx, eax
jb 0x40a560
test eax, eax
mov ecx, eax
mov ebx, eax
mov word [edi + eax*2], 0
jne 0x40a560
mov edi, 0x80004005
mov dword [ebp - 0x228], eax
jmp 0x40a5e1
test eax, eax
mov dword [ebp - 0x22c], 0
jns 0x40a8b0
mov edi, 0x80004005
jmp 0x40a5eb
mov dword [ebp - 0x228], ecx
push 0x2f
push edi
call fcn.00410261
add esp, 8
mov ecx, edi
mov edi, eax
push 0x5c
mov dword [ebp - 0x234], ecx
push ecx
call fcn.00410261
add esp, 8
cmp edi, eax
cmova eax, edi
mov edi, 0x80004005
test eax, eax
jne 0x40a988
mov dword [ebp - 0x22c], 0
mov eax, dword [ebp - 0x260]
mov dword [ebp - 0x260], 0
test eax, eax
je 0x40a608
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x224]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x224], 0
test eax, eax
je 0x40a628
push eax
call fcn.0040da4a
add esp, 4
cmp byte [ebp - 0x22c], 0
setne al
or byte [ebp - 0x230], al
jne 0x40a659
mov ebx, dword [ebp - 0x238]
mov edx, esi
mov ecx, ebx
push ebx
call fcn.0040a000
add esp, 4
cmp dword [ebx], 0
mov ebx, dword [ebp + 8]
je 0x40a4d1
cmp dword [esi + 8], 0xffffffff
jne 0x40a42a
mov edx, dword [ebp - 0x238]
mov ecx, esi
push 0
call fcn.0040ade0
add esp, 4
cmp dword [esi + 8], 0xffffffff
jne 0x40a430
jmp 0x40a459
push 0x20a
call fcn.0040da41
add esp, 4
mov dword [ebp - 0x230], eax
lea ecx, [eax + 2]
push 0x208
push 0
push ecx
call fcn.00410040
add esp, 0xc
mov eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x224], eax
mov word [eax], 0
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x228], 0
push dword [eax + 4]
call fcn.0040d720
call fcn.0041423c
mov dword [eax], 0
lea eax, [ebp - 0x220]
push eax
call fcn.0040d780
add esp, 4
test eax, eax
jne 0x40a773
mov ecx, edi
mov esi, ecx
call fcn.0041423c
cmp dword [eax], 0
mov eax, dword [ebp - 0x220]
mov edi, 0x80004005
cmove edi, esi
test esi, esi
cmovs edi, esi
cmp eax, 0xffffffff
je 0x40a722
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x224], 0
test eax, eax
je 0x40a4d1
push eax
call fcn.0040da4a
add esp, 4
jmp 0x40a4d1
test edi, edi
mov eax, 0x8007006f
cmovns edi, eax
mov dword [ebp - 0x230], edi
lea edi, [ebp - 0x220]
push edi
call fcn.0040d780
add esp, 4
mov ecx, dword [ebp - 0x230]
test eax, eax
mov edi, ecx
je 0x40a6f9
mov dword [ebp - 0x230], eax
push 0x42e024
push eax
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40a752
push 0x42e022
push dword [ebp - 0x230]
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40a752
cmp dword [esi + 0xc], 0
je 0x40a7bd
push dword [esi + 0x10]
push dword [ebp - 0x230]
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40a752
push dword [ebp - 0x230]
mov eax, dword [ebp - 0x238]
push dword [eax + 4]
push 0x42db84
push 0x105
lea eax, [ebp - 0x228]
push eax
call fcn.0040b170
add esp, 0x14
cmp dword [ebp - 0x228], 0
je 0x40a748
lea eax, [ebp - 0x24c]
lea edx, [ebp - 0x228]
mov dword [ebp - 0x24c], 2
mov dword [ebp - 0x248], 0xffffffff
mov dword [ebp - 0x244], 0xffffffff
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
mov ecx, eax
mov edx, edx
push 0
call fcn.0040ade0
add esp, 4
lea ecx, [ebp - 0x228]
lea edx, [ebp - 0x24c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040a370
add esp, 0xc
test edi, edi
cmovs eax, edi
mov dword [ebp - 0x230], eax
call fcn.0041423c
mov dword [eax], 0
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], 0
test eax, eax
je 0x40a88c
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x244]
lea edi, [ebp - 0x220]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40a75e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a75e
mov edi, dword [ebp - 0x224]
push 0x20a
call fcn.0040da41
add esp, 4
mov ebx, eax
add eax, 2
push 0x208
push 0
push eax
call fcn.00410040
add esp, 0xc
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x26c], 0
mov word [ebx], 0
push ebx
push dword [ebp - 0x22c]
push edi
call fcn.0040d910
add esp, 0xc
mov edi, 0x80004005
test eax, eax
je 0x40a970
push ebx
call fcn.00416b42
add esp, 4
test eax, eax
mov dword [ebp - 0x26c], eax
je 0x40a970
mov eax, dword [esi + 8]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40a92b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0xffffffff
mov dword [ebp - 0x234], ebx
push ebx
mov ebx, dword [ebp - 0x238]
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40a9fe
mov eax, dword [ebp + 0xc]
add eax, 0x80
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40aa27
mov ebx, dword [ebp - 0x234]
mov dword [ebp - 0x22c], 0
push ebx
call fcn.0040da4a
add esp, 4
jmp 0x40a5eb
add eax, 2
lea ecx, [ebp - 0x264]
mov edx, eax
call fcn.00409470
test eax, eax
mov dword [ebp - 0x22c], 0
js 0x40a5eb
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x40a5eb
lea ecx, [eax + 1]
cmp ebx, ecx
jb 0x40a5eb
not eax
add eax, ebx
cmp ebx, eax
jb 0x40a9df
mov ecx, dword [ebp - 0x234]
mov ebx, eax
mov dword [ebp - 0x228], eax
mov word [ecx + eax*2], 0
test ebx, ebx
je 0x40a5e1
mov eax, dword [ebp - 0x260]
mov edi, dword [ebp - 0x234]
mov dword [ebp - 0x22c], eax
jmp 0x40a8b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0x234]
movzx edi, ax
mov dword [ebp - 0x22c], 0
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x40a97a
mov edx, dword [ebp - 0x238]
mov ecx, esi
push 0
call fcn.0040ade0
add esp, 4
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x40aa84
mov ecx, dword [esi + 4]
cmp ecx, 0xffffffff
setne dl
test cl, 0x10
je 0x40aa89
cmp ecx, 0xffffffff
je 0x40aa89
mov ebx, dword [esi]
cmp ebx, 2
je 0x40aa89
cmp ebx, 1
je 0x40aa89
shr ecx, 0xa
and cl, dl
jne 0x40aa89
mov edx, dword [ebp - 0x238]
mov ecx, esi
push dword [ebp + 0xc]
call fcn.0040af20
add esp, 4
cmp eax, 1
je 0x40aaaa
mov eax, dword [esi + 8]
jmp 0x40aa89
mov eax, 0xffffffff
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40aa98
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x234]
mov dword [esi + 8], 0xffffffff
jmp 0x40a970
mov dword [ebp - 0x24c], 2
mov dword [ebp - 0x248], 0xffffffff
mov dword [ebp - 0x244], 0xffffffff
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
lea ecx, [ebp - 0x24c]
lea edx, [ebp - 0x26c]
push 0
call fcn.0040ade0
add esp, 4
cmp dword [ebp - 0x244], 0xffffffff
mov edi, 0x80004005
je 0x40ac6c
mov eax, dword [ebp - 0x248]
cmp eax, 0xffffffff
setne cl
test al, 0x10
je 0x40ac6c
cmp eax, 0xffffffff
je 0x40ac6c
mov edx, dword [ebp - 0x24c]
cmp edx, 2
je 0x40ac6c
cmp edx, 1
je 0x40ac6c
shr eax, 0xa
and al, cl
jne 0x40ac6c
push 0x20a
call fcn.0040da41
add esp, 4
mov edi, eax
add eax, 2
push 0x208
push 0
push eax
call fcn.00410040
add esp, 0xc
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x25c], 0
mov word [edi], 0
push 0x20a
call fcn.0040da41
add esp, 4
mov edi, eax
add eax, 2
push 0x208
push 0
push eax
call fcn.00410040
add esp, 0xc
mov dword [ebp - 0x250], edi
mov word [edi], 0
lea edi, [ebp - 0x220]
mov dword [ebp - 0x254], 0
mov ecx, edi
push dword [ebp - 0x234]
call fcn.0040d720
call fcn.0041423c
mov ebx, edi
mov dword [eax], 0
push edi
call fcn.0040d780
add esp, 4
test eax, eax
mov dword [ebp - 0x22c], 0
jne 0x40acb1
call fcn.0041423c
cmp dword [eax], 0
mov eax, dword [ebp - 0x22c]
mov ebx, 0x80004005
lea ecx, [ebp - 0x26c]
lea edx, [ebp - 0x24c]
cmove ebx, eax
test eax, eax
cmovs ebx, eax
call fcn.0040b1b0
mov edi, eax
mov eax, dword [ebp - 0x220]
test ebx, ebx
cmovs edi, ebx
cmp eax, 0xffffffff
je 0x40ac32
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x250], 0
test eax, eax
je 0x40ac4f
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x258]
mov dword [ebp - 0x258], 0
test eax, eax
je 0x40ac6c
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], 0
test eax, eax
je 0x40ac89
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x244]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40ac9e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x234]
mov al, 1
mov dword [ebp - 0x22c], eax
jmp 0x40a97a
mov edx, dword [ebp - 0x240]
mov ecx, dword [ebp - 0x23c]
mov edi, eax
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x274], edx
mov dword [ebp - 0x270], ecx
jmp 0x40ad00
mov eax, dword [ebp - 0x22c]
mov ecx, 0x8007006f
test eax, eax
cmovns eax, ecx
mov dword [ebp - 0x22c], eax
push ebx
call fcn.0040d780
add esp, 4
mov edi, eax
test eax, eax
je 0x40abed
push 0x42e024
push edi
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40aced
push 0x42e022
push edi
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40aced
cmp dword [ebp - 0x274], 0
je 0x40ad40
push dword [ebp - 0x270]
push edi
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40aced
push edi
push dword [ebp - 0x234]
push 0x42db84
push 0x105
lea eax, [ebp - 0x25c]
push eax
call fcn.0040b170
add esp, 0x14
cmp dword [ebp - 0x25c], 0
je 0x40acd7
push edi
mov eax, dword [ebp - 0x238]
push dword [eax + 4]
push 0x42db84
push 0x105
lea eax, [ebp - 0x254]
push eax
call fcn.0040b170
add esp, 0x14
cmp dword [ebp - 0x254], 0
je 0x40acd7
lea ecx, [ebp - 0x25c]
lea edx, [ebp - 0x254]
push dword [ebp + 0xc]
call fcn.0040b300
add esp, 4
mov edx, dword [ebp - 0x22c]
mov ecx, eax
test edx, edx
cmovs ecx, edx
test eax, eax
cmovs edx, ecx
mov dword [ebp - 0x22c], edx
call fcn.0041423c
mov dword [eax], 0
jmp 0x40aced