Function at 0x412670
Capabilities:
Enumerate files on windows
Move file

Disassembly:
sub esp, 0x50c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x504], eax
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
push ebp
push esi
push edi
push 0x276f
push dword [0x4e6030]
mov dword [esp + 0x48], edx
mov esi, ecx
call ebx
push 0x2785
push dword [0x4e6030]
mov edi, eax
mov dword [esp + 0x24], edi
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov dword [esp + 0x40], eax
call ebx
cmp word [esi + eax*2 - 2], 0x5c
jne 0x4126d3
push esi
call ebx
xor ecx, ecx
mov word [esi + eax*2 - 2], cx
push esi
mov dword [esp + 0x28], 0
call ebx
push 0
push 0
inc eax
mov dword [esp + 0x30], 1
push 0
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], 0x1312d00
call dword [sym.imp.KERNEL32.dll_HeapCreate]
push 0x1312d00
push 8
push eax
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x412d97
push 2
push 0x400
call fcn.004909d3
push 2
push 0x400
mov dword [esp + 0x24], eax
call fcn.004909d3
push 2
push 0x400
mov ebx, eax
call fcn.004909d3
push 2
push 0x400
mov dword [esp + 0x40], eax
call fcn.004909d3
add esp, 0x20
mov dword [esp + 0x44], eax
push esi
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
mov ebp, dword [sym.imp.USER32.dll_SendMessageW]
xor eax, eax
inc eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x24]
lea esi, [esi + eax*2]
push esi
push dword [esp + 0x18]
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push esi
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x24]
inc ecx
push 0x4b3508
add ecx, eax
push ebx
mov dword [esp + 0x2c], ecx
call dword [sym.imp.SHLWAPI.dll_StrCatW]
lea eax, [esp + 0xb8]
mov esi, 1
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
je 0x412d65
test esi, esi
je 0x412d61
cmp dword [0x4cc1c8], 0
je 0x412d9f
mov esi, dword [sym.imp.SHLWAPI.dll_StrCmpIW]
lea eax, [esp + 0xe4]
push 0x4b3510
push eax
call esi
test eax, eax
je 0x412d48
push 0x4b3514
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
je 0x412d48
test byte [esp + 0xb8], 0x10
lea eax, [esp + 0xe4]
mov esi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push str.recycle
push eax
je 0x412ae7
call esi
test eax, eax
jne 0x412d48
push str.wintools
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jne 0x412d48
push str.systemindex
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jne 0x412d48
mov edx, dword [esp + 0x14]
lea ecx, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x412880
sub edx, ecx
lea ecx, [esp + 0xe4]
sar edx, 1
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4128a0
sub ecx, esi
sar ecx, 1
lea eax, [ecx + 4]
add eax, edx
cmp eax, 0x104
jae 0x412d48
lea eax, [esp + 0xe4]
push eax
push dword [esp + 0x18]
push 0x4b3544
push 0x400
push ebx
call fcn.0040a420
add esp, 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [esp + 0x38]
add eax, esi
mov ecx, dword [esp + 0x34]
lea eax, [eax*2 + 2]
cmp eax, ecx
mov eax, dword [esp + 0x18]
jb 0x412922
add ecx, 0x1312d00
push ecx
push eax
push 8
push dword [esp + 0x3c]
mov dword [esp + 0x44], ecx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x412d7f
inc dword [esp + 0x28]
lea eax, [eax + esi*2]
push ebx
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x3c]
inc esi
add esi, eax
mov edx, ebx
mov dword [esp + 0x38], esi
call fcn.00410b60
test eax, eax
jne 0x412d48
push ebx
mov edx, 0x4b3f64
mov ecx, str.FILE
call fcn.00478640
push eax
push 0x400
push 0x4d6040
call fcn.0040a420
add esp, 0x10
cmp dword [0x4e5c1c], 2
jne 0x4129b4
push 0
push 0
push 0x130b
push 0x2763
push dword [0x4e6030]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call ebp
cmp eax, 5
je 0x4129b4
push 0x4d6040
push 1
push 0x40b
push dword [0x4e5c10]
call ebp
mov esi, dword [esp + 0x44]
push ebx
push esi
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push 0x4b451c
push esi
call dword [sym.imp.SHLWAPI.dll_StrCatW]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x412d48
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push 0
push 0
push 0x1004
push edi
call ebp
push 0x4d6840
push 0
push 0x104d
push edi
mov dword [0x4d6844], eax
mov dword [0x4d685c], 1
mov dword [0x4d6854], ebx
call ebp
lea eax, [esp + 0x4c]
mov dword [esp + 0x54], 2
push eax
push dword [0x4d6844]
mov dword [esp + 0x68], str.Directory
push 0x1074
push edi
call ebp
mov eax, dword [esp + 0x40]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x4c]
push eax
push dword [0x4d6844]
mov dword [esp + 0x5c], 1
push 0x1074
push edi
call ebp
xor eax, eax
push 0x206
push eax
mov word [esp + 0x310], ax
lea eax, [esp + 0x312]
push eax
call fcn.0048fb10
add esp, 0xc
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x412d39
lea eax, [esp + 0x98]
push eax
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x412d39
movzx eax, word [esp + 0xa2]
push eax
movzx eax, word [esp + 0xa4]
push eax
movzx eax, word [esp + 0xa6]
push eax
movzx eax, word [esp + 0xa6]
push eax
movzx eax, word [esp + 0xa8]
jmp 0x412cf8
call esi
test eax, eax
jne 0x412d48
push str.wintools
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jne 0x412d48
push str.systemindex
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jne 0x412d48
mov edx, dword [esp + 0x14]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x412b26
sub edx, ecx
lea eax, [esp + 0xe4]
sar edx, 1
lea esi, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412b40
sub eax, esi
sar eax, 1
add eax, 4
add eax, edx
cmp eax, 0x104
jae 0x412d48
mov esi, dword [esp + 0x20]
lea eax, [esp + 0xe4]
push eax
push dword [esp + 0x18]
push 0x4b3544
push 0x400
push esi
call fcn.0040a420
mov ecx, dword [esp + 0x50]
add esp, 0x14
mov edx, esi
call fcn.00410b60
test eax, eax
jne 0x412d48
push eax
push 0x20000080
push 3
push eax
push 4
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x412bb5
xor eax, eax
jmp 0x412bc1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
test eax, eax
je 0x412d48
mov edi, dword [esp + 0xd4]
xor esi, esi
add esi, dword [esp + 0xd8]
push 0
push 0
push 0x1004
push dword [esp + 0x28]
adc edi, 0
call ebp
push 0x4d6840
push 0
push 0x104d
push dword [esp + 0x28]
mov dword [0x4d6844], eax
mov eax, dword [esp + 0x30]
mov dword [0x4d685c], 0
mov dword [0x4d6854], eax
call ebp
push edi
push esi
mov dword [esp + 0x5c], 2
call fcn.00465af0
add esp, 8
mov dword [esp + 0x60], eax
lea eax, [esp + 0x4c]
push eax
push dword [0x4d6844]
push 0x1074
push dword [esp + 0x28]
call ebp
mov eax, dword [esp + 0x40]
add dword [0x4d5830], esi
mov dword [esp + 0x60], eax
lea eax, [esp + 0x4c]
adc dword [0x4d5834], edi
mov edi, dword [esp + 0x1c]
push eax
push dword [0x4d6844]
mov dword [esp + 0x5c], 1
push 0x1074
push edi
call ebp
xor eax, eax
push 0x206
push eax
mov word [esp + 0x310], ax
lea eax, [esp + 0x312]
push eax
call fcn.0048fb10
add esp, 0xc
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x412d39
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x412d39
movzx eax, word [esp + 0xb2]
push eax
movzx eax, word [esp + 0xb4]
push eax
movzx eax, word [esp + 0xb6]
push eax
movzx eax, word [esp + 0xb6]
push eax
movzx eax, word [esp + 0xb8]
push eax
push 0x4b44bc
lea eax, [esp + 0x320]
push 0x104
push eax
call fcn.0040a420
add esp, 0x20
mov dword [esp + 0x54], 3
lea eax, [esp + 0x308]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x4c]
push eax
push dword [0x4d6844]
push 0x1074
push edi
call ebp
push 0x1869f
push 0
push 0x1014
push edi
call ebp
lea eax, [esp + 0xb8]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
jmp 0x4127d0
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x48]
cmp eax, dword [esp + 0x28]
je 0x412de1
mov esi, dword [esp + 0x18]
jmp 0x412772
push 0x10
push str.Error_23
push str.No_free_memory.
push dword [0x4e6030]
call dword [sym.imp.USER32.dll_MessageBoxW]
or eax, 0xffffffff
jmp 0x412e1e
call fcn.00411ab0
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [esp + 0x20]
call fcn.004909de
add esp, 4
push ebx
call fcn.004909de
add esp, 4
push dword [esp + 0x14]
call fcn.004909de
add esp, 4
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
push 1
call dword [sym.imp.KERNEL32.dll_ExitThread]
mov eax, dword [esp + 0x44]
push eax
call fcn.004909de
add esp, 4
push dword [esp + 0x20]
call fcn.004909de
add esp, 4
push ebx
call fcn.004909de
add esp, 4
push dword [esp + 0x14]
call fcn.004909de
add esp, 4
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
mov eax, 1
mov ecx, dword [esp + 0x514]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0048ea75
add esp, 0x50c
ret