Function at 0x40d090
Capabilities:
Create directory
Move file
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47695d
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x4194
call fcn.0046df10
mov eax, dword [0x4c60a0]
xor eax, esp
mov dword [esp + 0x4190], eax
push ebx
push esi
push edi
mov eax, dword [0x4c60a0]
xor eax, esp
push eax
lea eax, [esp + 0x41a8]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea esi, [esp + 0x160]
mov eax, edi
mov dword [esp + 0x20], edi
call fcn.00406f30
lea esi, [esp + 0x10c]
mov eax, edi
mov dword [esp + 0x41b0], 0
call fcn.00406f60
mov edi, 1
mov ebx, esi
mov byte [esp + 0x41b0], 1
call fcn.0040f5e0
mov ecx, dword [esp + 0x120]
dec ecx
cmp eax, ecx
je 0x40d130
push edi
mov eax, 0x498bc8
mov ecx, esi
call fcn.0040a380
mov eax, dword [esp + 0x164]
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x178], 8
mov dword [esp + 0x10], ebx
mov dword [esp + 0x40], edi
mov dword [esp + 0x28], 0x428930
mov dword [esp + 0x2c], 0x428950
mov dword [esp + 0x54], 0x428930
mov dword [esp + 0x58], 0x428950
jae 0x40d174
lea eax, [esp + 0x164]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x50], eax
cmp eax, 0xffffffff
jne 0x40d1fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, edi
je 0x40d1fa
mov ebx, 8
cmp dword [esp + 0x124], ebx
jb 0x40d1be
mov edx, dword [esp + 0x110]
push edx
call fcn.0046202e
add esp, 4
xor eax, eax
cmp dword [esp + 0x178], ebx
mov word [esp + 0x110], ax
mov dword [esp + 0x120], edi
mov dword [esp + 0x124], 7
jb 0x40d1f3
mov ecx, dword [esp + 0x164]
push ecx
call fcn.0046202e
add esp, 4
mov eax, esi
jmp 0x40dccd
lea edx, [esp + 0x48]
mov dword [esp + 0x48], 0x429750
mov dword [esp + 0x4c], 0x429780
mov dword [esp + 0x17c], 0x42bf40
mov dword [esp + 0x180], 0x42bfa0
mov dword [esp + 0x184], 0x42bfb0
mov dword [esp + 0x188], 0x42c010
mov dword [esp + 0x18c], edx
mov dword [esp + 0x194], edi
mov dword [esp + 0x190], edi
call fcn.004289b0
lea eax, [esp + 0x17c]
push eax
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x30]
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edi
mov dword [esp + 0x84], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa0], edi
mov dword [esp + 0xa4], edi
mov dword [esp + 0xa8], edi
mov dword [esp + 0xac], edi
mov dword [esp + 0xb0], edi
mov dword [esp + 0xb4], edi
call fcn.0042b880
mov esi, eax
add esp, 8
cmp esi, edi
je 0x40d2e0
lea edi, [esp + 0x28]
lea eax, [esp + 0x64]
call fcn.00429980
xor edi, edi
mov dword [esp + 0x24], esi
cmp esi, edi
je 0x40d311
cmp dword [esp + 0x124], 8
jb 0x40d302
mov edx, dword [esp + 0x110]
push edx
call fcn.0046202e
add esp, 4
xor eax, eax
cmp dword [esp + 0x178], 8
jmp 0x40d1c7
mov eax, dword [esp + 0x80]
mov esi, dword [esp + 0x20]
mov edx, dword [esi]
dec eax
push eax
push edi
mov dword [esp + 0x64], eax
mov eax, dword [edx + 0x1c]
push 0xbd0
mov ecx, esi
mov dword [esp + 0x50], 0xffffffff
mov dword [esp + 0x3c], edi
mov dword [esp + 0x6c], edi
call eax
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [esi]
mov eax, dword [edx + 0x1c]
push edi
push 0x64
push 0x65
mov ecx, esi
call eax
push eax
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [esp + 0x14], edi
cmp dword [esp + 0x80], edi
jbe 0x40db51
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x1c], ecx
xor esi, esi
push 0xffffffffffffffff
xor edx, edx
mov edi, 7
push esi
lea eax, [esp + 0x114]
lea ecx, [esp + 0xdc]
mov dword [esp + 0xf4], edi
mov dword [esp + 0xf0], esi
mov word [esp + 0xe0], dx
call fcn.0040a460
mov byte [esp + 0x41b0], 2
xor eax, eax
push 0xffffffffffffffff
mov word [esp + 0xf8], ax
push esi
lea eax, [esp + 0x114]
lea ecx, [esp + 0xf8]
mov dword [esp + 0x110], edi
mov dword [esp + 0x10c], esi
call fcn.0040a460
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x41b0], 3
mov edi, dword [esp + 0xa4]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x18], esi
mov esi, dword [edi + ecx*4 + 4]
mov edx, ecx
sub esi, dword [edi + edx*4]
cmp esi, dword [esp + 0x40]
jbe 0x40d43e
push ebx
call fcn.00463414
lea eax, [esi + esi]
add esp, 4
mov dword [esp + 0x40], esi
test eax, eax
je 0x40da55
push eax
call fcn.004634f1
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x40da5d
mov ebx, eax
mov esi, dword [esp + 0x14]
mov eax, dword [edi + esi*4]
mov ecx, dword [edi + esi*4 + 4]
sub ecx, eax
test ebx, ebx
je 0x40d470
mov edx, dword [esp + 0xa8]
lea edx, [edx + eax*2]
test ecx, ecx
jbe 0x40d470
mov eax, ebx
sub edx, ebx
mov di, word [edx + eax]
mov word [eax], di
add eax, 2
sub ecx, 1
jne 0x40d461
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x198]
push esi
push ecx
lea eax, [esp + 0x88]
call fcn.0042bca0
add esp, 0x24
mov dword [esp + 0x24], eax
test eax, eax
jne 0x40dad5
xor edi, edi
cmp word [ebx], di
je 0x40d58a
mov esi, ebx
xor edx, edx
push 0xffffffffffffffff
push edx
lea eax, [esp + 0x114]
lea ecx, [esp + 0x130]
mov dword [esp + 0x148], 7
mov dword [esp + 0x144], 0
mov word [esp + 0x134], dx
call fcn.0040a460
mov byte [esp + 0x41b0], 4
cmp word [esi], 0x2f
jne 0x40d559
xor eax, eax
mov word [esi], ax
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d512
sub eax, edx
sar eax, 1
push eax
mov eax, ebx
lea ecx, [esp + 0x12c]
call fcn.0040a380
cmp dword [esp + 0x140], 8
mov eax, dword [esp + 0x12c]
jae 0x40d548
lea eax, [esp + 0x12c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, 0x5c
mov word [esi], cx
mov byte [esp + 0x41b0], 3
cmp dword [esp + 0x140], 8
jb 0x40d57b
mov edx, dword [esp + 0x12c]
push edx
call fcn.0046202e
add esp, 4
inc edi
cmp word [ebx + edi*2], 0
lea esi, [ebx + edi*2]
jne 0x40d4c4
mov eax, ebx
mov esi, 8
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d594
sub eax, edx
sar eax, 1
push eax
mov eax, ebx
lea ecx, [esp + 0xd8]
call fcn.0040a380
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x19], 0
mov eax, dword [esp + 0xd8]
je 0x40d655
cmp dword [esp + 0xec], esi
jae 0x40d5d7
lea eax, [esp + 0xd8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [esp + 0x108], esi
jb 0x40d5f9
mov ecx, dword [esp + 0xf4]
push ecx
call fcn.0046202e
add esp, 4
xor edx, edx
mov edi, 7
mov byte [esp + 0x41b0], 1
mov dword [esp + 0x108], edi
mov dword [esp + 0x104], 0
mov word [esp + 0xf4], dx
cmp dword [esp + 0xec], esi
jb 0x40d63b
mov eax, dword [esp + 0xd8]
push eax
call fcn.0046202e
add esp, 4
xor ecx, ecx
mov dword [esp + 0xe8], 0
mov word [esp + 0xd8], cx
jmp 0x40da2e
cmp dword [esp + 0xec], esi
jae 0x40d665
lea eax, [esp + 0xd8]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x3c], esi
cmp esi, 0xffffffff
jne 0x40d8c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40d8c0
push esi
push 0
lea eax, [esp + 0xdc]
lea ecx, [esp + 0xf8]
mov dword [esp + 0x40], 1
call fcn.0040a460
push 1
lea ebx, [esp + 0xd8]
call fcn.0040a5f0
push 1
mov esi, eax
call fcn.0040a5f0
mov ecx, dword [esp + 0xe8]
sub ecx, esi
lea edx, [eax + 1]
mov eax, ebx
dec ecx
push eax
lea esi, [esp + 0x12c]
call fcn.0040a170
lea ecx, [esp + 0x10c]
push ecx
mov ebx, 0x49ba58
lea esi, [esp + 0xbc]
mov byte [esp + 0x41b4], 5
call fcn.0040b0e0
add esp, 4
push 0xffffffffffffffff
xor edi, edi
push edi
lea ecx, [esp + 0xdc]
mov byte [esp + 0x41b8], 6
call fcn.0040a460
mov ebx, 8
mov byte [esp + 0x41b0], 5
cmp dword [esp + 0xd0], ebx
jb 0x40d74f
mov edx, dword [esp + 0xbc]
push edx
call fcn.0046202e
add esp, 4
mov eax, dword [esp + 0xd8]
cmp dword [esp + 0xec], ebx
jae 0x40d766
lea eax, [esp + 0xd8]
push edi
push eax
call fcn.0046272a
add esp, 8
test eax, eax
je 0x40d793
mov eax, dword [esp + 0xd8]
cmp dword [esp + 0xec], ebx
jae 0x40d78b
lea eax, [esp + 0xd8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
lea eax, [esp + 0x12c]
push eax
or eax, 0xffffffff
lea esi, [esp + 0xdc]
call fcn.0040a2c0
mov eax, dword [esp + 0xd8]
cmp dword [esp + 0xec], ebx
jae 0x40d7c2
lea eax, [esp + 0xd8]
push edi
push 0x80
push 2
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x3c], esi
cmp esi, 0xffffffff
jne 0x40d89f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
je 0x40d89f
cmp dword [esp + 0x140], ebx
jb 0x40d80f
mov ecx, dword [esp + 0x12c]
push ecx
call fcn.0046202e
add esp, 4
xor edx, edx
mov esi, 7
mov dword [esp + 0x140], esi
mov dword [esp + 0x13c], edi
mov word [esp + 0x12c], dx
cmp dword [esp + 0x108], ebx
jb 0x40d845
mov eax, dword [esp + 0xf4]
push eax
call fcn.0046202e
add esp, 4
xor ecx, ecx
mov byte [esp + 0x41b0], 1
mov dword [esp + 0x108], esi
mov dword [esp + 0x104], edi
mov word [esp + 0xf4], cx
cmp dword [esp + 0xec], ebx
jb 0x40d87e
mov edx, dword [esp + 0xd8]
push edx
call fcn.0046202e
add esp, 4
mov ebx, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0xec], esi
mov dword [esp + 0xe8], edi
mov word [esp + 0xd8], ax
jmp 0x40da35
mov byte [esp + 0x41b0], 3
cmp dword [esp + 0x140], ebx
jb 0x40d8c0
mov ecx, dword [esp + 0x12c]
push ecx
call fcn.0046202e
add esp, 4
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x3c]
add eax, edx
push ecx
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
call fcn.00429640
add esp, 4
test eax, eax
jne 0x40d9bb
cmp dword [esp + 0x18], ebx
jne 0x40d9bb
cmp esi, 0xffffffff
je 0x40d938
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40d938
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40d938
lea esi, [esp + 0xf0]
call fcn.0040a080
lea esi, [esp + 0xd4]
mov byte [esp + 0x41b0], 1
call fcn.0040a080
mov ebx, dword [esp + 0x10]
jmp 0x40da35
mov ecx, dword [esp + 0x1c]
cmp byte [ecx + 0x1d], 0
mov esi, 8
je 0x40d969
mov eax, dword [esp + 0xd8]
cmp dword [esp + 0xec], esi
jae 0x40d95e
lea eax, [esp + 0xd8]
mov edx, dword [ecx + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x38], 0
je 0x40d9a8
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x108], esi
jae 0x40d987
lea ecx, [esp + 0xf4]
mov eax, dword [esp + 0xd8]
cmp dword [esp + 0xec], esi
jae 0x40d99e
lea eax, [esp + 0xd8]
push 5
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x160], eax
jmp 0x40d90f
mov ebx, 8
cmp dword [esp + 0x108], ebx
jb 0x40d9d9
mov edx, dword [esp + 0xf4]
push edx
call fcn.0046202e
add esp, 4
xor esi, esi
xor eax, eax
mov edi, 7
mov byte [esp + 0x41b0], 1
mov dword [esp + 0x108], edi
mov dword [esp + 0x104], esi
mov word [esp + 0xf4], ax
cmp dword [esp + 0xec], ebx
jb 0x40da19
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.0046202e
add esp, 4
mov ebx, dword [esp + 0x10]
xor edx, edx
mov dword [esp + 0xe8], esi
mov word [esp + 0xd8], dx
mov dword [esp + 0xec], edi
mov eax, dword [esp + 0x14]
add dword [esp + 0x1c], 0x20
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x80]
jb 0x40d376
jmp 0x40db51
mov dword [esp + 0x10], 0
mov edi, 8
mov dword [esp + 0x24], 2
cmp dword [esp + 0x108], edi
jb 0x40da83
mov eax, dword [esp + 0xf4]
push eax
call fcn.0046202e
add esp, 4
xor ecx, ecx
mov esi, 7
mov byte [esp + 0x41b0], 1
mov dword [esp + 0x108], esi
mov dword [esp + 0x104], 0
mov word [esp + 0xf4], cx
cmp dword [esp + 0xec], edi
jb 0x40dac5
mov edx, dword [esp + 0xd8]
push edx
call fcn.0046202e
add esp, 4
mov ebx, dword [esp + 0x10]
xor eax, eax
mov word [esp + 0xd8], ax
jmp 0x40db3f
mov edi, 8
cmp dword [esp + 0x108], edi
jb 0x40daf3
mov ecx, dword [esp + 0xf4]
push ecx
call fcn.0046202e
add esp, 4
xor edx, edx
mov esi, 7
mov byte [esp + 0x41b0], 1
mov dword [esp + 0x108], esi
mov dword [esp + 0x104], 0
mov word [esp + 0xf4], dx
cmp dword [esp + 0xec], edi
jb 0x40db35
mov eax, dword [esp + 0xd8]
push eax
call fcn.0046202e
add esp, 4
xor ecx, ecx
mov word [esp + 0xd8], cx
mov dword [esp + 0xe8], 0
mov dword [esp + 0xec], esi
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x80]
push 0
dec eax
mov dword [ecx + 0x160], edx
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c]
push 0xbd1
call eax
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x2c]
push edx
call dword [esp + 0x34]
lea edi, [esp + 0x30]
lea eax, [esp + 0x6c]
call fcn.00429980
push ebx
call fcn.00463414
mov eax, dword [esp + 0x5c]
add esp, 0xc
cmp eax, 0xffffffff
je 0x40dbc5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40dbbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40dbc5
mov dword [esp + 0x50], 0xffffffff
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
push 0
push 0
push 0xbd2
call edx
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x10c]
push eax
mov ebx, 0x49ba58
lea esi, [esp + 0x148]
call fcn.0040b0e0
mov eax, dword [esp + 0x14c]
mov edi, 8
add esp, 4
cmp dword [esp + 0x15c], edi
jae 0x40dc18
lea eax, [esp + 0x148]
xor ebx, ebx
push ebx
push eax
call fcn.0046272a
add esp, 8
test eax, eax
jne 0x40dc49
mov eax, dword [esp + 0x148]
cmp dword [esp + 0x15c], edi
jae 0x40dc3f
lea eax, [esp + 0x148]
push 4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp dword [esp + 0x15c], edi
jb 0x40dc62
mov ecx, dword [esp + 0x148]
push ecx
call fcn.0046202e
add esp, 4
xor edx, edx
mov esi, 7
mov dword [esp + 0x15c], esi
mov dword [esp + 0x158], ebx
mov word [esp + 0x148], dx
cmp dword [esp + 0x124], edi
jb 0x40dc98
mov eax, dword [esp + 0x110]
push eax
call fcn.0046202e
add esp, 4
xor ecx, ecx
mov dword [esp + 0x124], esi
mov dword [esp + 0x120], ebx
mov word [esp + 0x110], cx
cmp dword [esp + 0x178], edi
jb 0x40dcc9
mov edx, dword [esp + 0x164]
push edx
call fcn.0046202e
add esp, 4
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x41a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4190]
xor ecx, esp
call fcn.00462039
mov esp, ebp
pop ebp
ret 4