Function at 0x412219
Capabilities:
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x974
mov dword [ebp - 0x144], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x412b91
mov dword [ebp - 0x964], 0
mov dword [ebp - 0x974], 0
mov dword [ebp - 0x560], 0
push 0x400
call fcn.00414f65
mov dword [ebp - 0x55c], eax
push 0x400
call fcn.00414f65
mov dword [ebp - 0x558], eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004462d0
add esp, 4
sub eax, 1
mov dword [ebp - 0x970], eax
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x970]
movsx eax, byte [edx]
cmp eax, 0x5c
je 0x4122c4
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x970]
movsx edx, byte [ecx]
cmp edx, 0x2f
je 0x4122c4
push 0x46cb3a
mov eax, dword [ebp + 8]
push eax
call fcn.004452f0
add esp, 8
mov dword [ebp - 0x96c], 0
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x96c]
movsx edx, byte [ecx]
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x96c]
movsx ecx, byte [eax]
cmp edx, ecx
jne 0x41230b
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x96c]
movsx eax, byte [edx]
test eax, eax
je 0x41230b
mov ecx, dword [ebp - 0x96c]
add ecx, 1
mov dword [ebp - 0x96c], ecx
jmp 0x4122ce
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x96c]
movsx eax, byte [edx]
cmp eax, 0x2f
je 0x41232d
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x96c]
movsx edx, byte [ecx]
cmp edx, 0x5c
jne 0x41233c
mov eax, dword [ebp - 0x96c]
add eax, 1
mov dword [ebp - 0x96c], eax
mov dword [ebp - 0x968], 0
jmp 0x412357
mov ecx, dword [ebp - 0x968]
add ecx, 1
mov dword [ebp - 0x968], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x968]
cmp eax, dword [edx + 4]
jge 0x412379
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x968]
mov ecx, dword [edx + eax*4]
mov byte [ecx + 9], 0
jmp 0x412348
mov dl, byte [ebp + 0x14]
push edx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x96c]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0041211f
add esp, 0xc
mov edx, dword [ebp - 0x144]
add edx, eax
mov dword [ebp - 0x144], edx
lea eax, [ebp - 0x140]
push eax
push 0x46cb3c
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0xffffffff
je 0x412a52
movsx ecx, byte [ebp - 0x10]
test ecx, ecx
jne 0x4123e1
lea edx, [ebp - 0x114]
push edx
lea eax, [ebp - 0x10]
push eax
call fcn.004452e0
add esp, 8
mov dword [ebp - 0x968], 0
jmp 0x4123fc
mov ecx, dword [ebp - 0x968]
add ecx, 1
mov dword [ebp - 0x968], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x968]
cmp eax, dword [edx + 4]
jge 0x412a29
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x968]
mov ecx, dword [edx + eax*4]
movsx edx, byte [ecx + 8]
cmp edx, 1
je 0x412457
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
movsx ecx, byte [eax + 8]
cmp ecx, 3
je 0x412457
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x968]
mov edx, dword [eax + ecx*4]
movsx eax, byte [edx + 8]
cmp eax, 2
jne 0x412a24
mov ecx, dword [0x4854d0]
cmp ecx, dword [ebp - 0x968]
jle 0x412471
movsx edx, byte [ebp + 0x14]
test edx, edx
jne 0x412a24
push 0x46cb3e
lea eax, [ebp - 0x114]
push eax
call fcn.004450c0
add esp, 8
test eax, eax
je 0x412a24
push 0x46cb40
lea ecx, [ebp - 0x114]
push ecx
call fcn.004450c0
add esp, 8
test eax, eax
je 0x412a24
cmp dword [0x46bfc8], 0
je 0x4124bf
mov edx, dword [ebp - 0x140]
and edx, 0x10
test edx, edx
jne 0x41250e
cmp dword [0x46bfc0], 0
je 0x4124d5
mov eax, dword [ebp - 0x140]
and eax, 1
test eax, eax
jne 0x41250e
cmp dword [0x46bfcc], 0
je 0x4124eb
mov ecx, dword [ebp - 0x140]
and ecx, 4
test ecx, ecx
jne 0x41250e
cmp dword [0x46bfc4], 0
je 0x412501
mov edx, dword [ebp - 0x140]
and edx, 2
test edx, edx
jne 0x41250e
cmp dword [0x46bfbc], 0
je 0x412a24
cmp dword [0x46bfc0], 0
jne 0x412528
mov eax, dword [ebp - 0x140]
and eax, 1
test eax, eax
jne 0x412a24
cmp dword [0x46bfcc], 0
jne 0x412542
mov ecx, dword [ebp - 0x140]
and ecx, 4
test ecx, ecx
jne 0x412a24
cmp dword [0x46bfc4], 0
jne 0x41255c
mov edx, dword [ebp - 0x140]
and edx, 2
test edx, edx
jne 0x412a24
cmp dword [0x46bfc8], 0
jne 0x412576
mov eax, dword [ebp - 0x140]
and eax, 0x10
test eax, eax
jne 0x412a24
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x968]
mov ecx, dword [edx + eax*4]
movsx edx, byte [ecx + 0xa]
test edx, edx
je 0x412713
cmp dword [0x46bfd0], 0
je 0x412713
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
mov byte [eax + 9], 0
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x96c]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x968]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx + 4]
push eax
call fcn.00414d21
add esp, 8
mov dword [ebp - 0x964], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x96c]
push ecx
lea edx, [ebp - 0x114]
push edx
call fcn.00414d21
add esp, 8
mov dword [ebp - 0x974], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
movsx ecx, byte [eax + 8]
cmp ecx, 2
jne 0x412634
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax]
push ecx
call fcn.00414e5d
add esp, 8
mov dword [ebp - 0x560], eax
jmp 0x41265d
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x96c]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax]
push ecx
call fcn.00414d21
add esp, 8
mov dword [ebp - 0x560], eax
mov edx, dword [ebp - 0x964]
push edx
mov eax, dword [ebp - 0x560]
push eax
mov ecx, dword [ebp - 0x974]
push ecx
lea edx, [ebp - 0x548]
push edx
call dword [0x46bfb4]
add esp, 0x10
test eax, eax
je 0x4126a6
xor eax, eax
cmp dword [0x48549c], 0
setne al
inc eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x968]
mov edx, dword [edx + ecx*4]
mov byte [edx + 9], al
jmp 0x4126ea
mov eax, dword [ebp - 0x964]
push eax
mov ecx, dword [ebp - 0x560]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x548]
push eax
call dword [0x46bfb4]
add esp, 0x10
test eax, eax
je 0x4126ea
mov ecx, dword [0x4854a0]
neg ecx
sbb ecx, ecx
add ecx, 2
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov edx, dword [ebp - 0x968]
mov eax, dword [eax + edx*4]
mov byte [eax + 9], cl
mov ecx, dword [ebp - 0x964]
push ecx
call fcn.00415008
mov edx, dword [ebp - 0x560]
push edx
call fcn.00415008
mov eax, dword [ebp - 0x974]
push eax
call fcn.00415008
jmp 0x412811
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x968]
mov ecx, dword [edx + eax*4]
movsx edx, byte [ecx + 9]
test edx, edx
jne 0x412811
cmp dword [0x46bfd4], 0
je 0x412743
cmp dword [0x4854cc], 1
jne 0x412811
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x114]
push edx
call fcn.00452690
add esp, 8
test eax, eax
jne 0x412787
xor eax, eax
cmp dword [0x48549c], 0
setne al
inc eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x968]
mov edx, dword [edx + ecx*4]
mov byte [edx + 9], al
jmp 0x4127c5
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x10]
push edx
call fcn.00452690
add esp, 8
test eax, eax
jne 0x4127c5
mov eax, dword [0x4854a0]
neg eax
sbb eax, eax
add eax, 2
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x968]
mov edx, dword [edx + ecx*4]
mov byte [edx + 9], al
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x96c]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x968]
mov ecx, dword [edx + eax*4]
mov edx, dword [ecx + 4]
push edx
call fcn.00414d21
add esp, 8
mov dword [ebp - 0x964], eax
mov eax, dword [ebp - 0x964]
push eax
lea ecx, [ebp - 0x548]
push ecx
call fcn.004452e0
add esp, 8
mov edx, dword [ebp - 0x964]
push edx
call fcn.00415008
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
movsx ecx, byte [eax + 9]
cmp ecx, 3
je 0x412a24
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x968]
mov edx, dword [eax + ecx*4]
movsx eax, byte [edx + 9]
test eax, eax
je 0x412a24
cmp dword [0x485494], 0
je 0x412864
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0xffffffff
add ecx, dword [ebp - 0x120]
mov dword [ebp - 0x554], ecx
cmp dword [0x485490], 0
je 0x412882
lea edx, [ebp - 0x140]
push edx
call section..text
add esp, 4
mov dword [ebp - 0x550], eax
cmp dword [0x485498], 0
je 0x4128a0
lea eax, [ebp - 0x140]
push eax
call fcn.00412ec5
add esp, 4
mov byte [ebp - 0x54c], al
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x96c]
movsx edx, byte [ecx]
test edx, edx
je 0x41299c
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
movsx ecx, byte [eax + 9]
cmp ecx, 1
jne 0x4128f2
lea edx, [ebp - 0x114]
push edx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x96c]
push eax
push 0x46cb44
mov ecx, dword [ebp - 0x55c]
push ecx
call fcn.0044634b
add esp, 0x10
jmp 0x412914
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x96c]
push eax
push 0x46cb4c
mov ecx, dword [ebp - 0x55c]
push ecx
call fcn.0044634b
add esp, 0x10
lea edx, [ebp - 0x548]
push edx
push 0x46cb54
mov eax, dword [ebp - 0x558]
push eax
call fcn.0044634b
add esp, 0xc
lea ecx, [ebp - 0x548]
push ecx
call fcn.00413c3a
add esp, 4
movsx edx, al
cmp edx, 2
je 0x412966
lea eax, [ebp - 0x55c]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x968]
mov ecx, dword [edx + eax*4]
push ecx
call fcn.00413d4d
add esp, 8
jmp 0x41299a
lea edx, [ebp - 0x548]
push edx
mov eax, dword [ebp - 0x558]
push eax
call fcn.004452e0
add esp, 8
lea ecx, [ebp - 0x55c]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x968]
mov edx, dword [eax + ecx*4]
push edx
call fcn.00413d4d
add esp, 8
jmp 0x412a12
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
movsx ecx, byte [eax + 9]
cmp ecx, 1
jne 0x4129cb
lea edx, [ebp - 0x114]
push edx
mov eax, dword [ebp - 0x55c]
push eax
call fcn.004452e0
add esp, 8
jmp 0x4129de
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x55c]
push edx
call fcn.004452e0
add esp, 8
lea eax, [ebp - 0x548]
push eax
mov ecx, dword [ebp - 0x558]
push ecx
call fcn.004452e0
add esp, 8
lea edx, [ebp - 0x55c]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x968]
mov eax, dword [ecx + edx*4]
push eax
call fcn.00413d4d
add esp, 8
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x968]
mov ecx, dword [edx + eax*4]
mov byte [ecx + 9], 3
jmp 0x4123ed
lea edx, [ebp - 0x140]
push edx
mov eax, dword [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4123c6
mov ecx, dword [ebp - 0x148]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [0x4854cc], 1
jne 0x412b79
lea edx, [ebp - 0x140]
push edx
push 0x46cb58
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0xffffffff
je 0x412b79
mov eax, dword [ebp - 0x140]
and eax, 0x10
test eax, eax
je 0x412b50
push 0x46cb5a
lea ecx, [ebp - 0x114]
push ecx
call fcn.004450c0
add esp, 8
test eax, eax
je 0x412b50
push 0x46cb5c
lea edx, [ebp - 0x114]
push edx
call fcn.004450c0
add esp, 8
test eax, eax
je 0x412b50
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x960]
push ecx
call fcn.004452e0
add esp, 8
cmp dword [0x48549c], 0
je 0x412afe
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x960]
push eax
call fcn.004452f0
add esp, 8
jmp 0x412b14
lea ecx, [ebp - 0x114]
push ecx
lea edx, [ebp - 0x960]
push edx
call fcn.004452f0
add esp, 8
mov al, byte [ebp + 0x14]
add al, 1
mov byte [ebp + 0x14], al
mov cl, byte [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x960]
push ecx
call fcn.00412219
add esp, 0x10
mov edx, dword [ebp - 0x144]
add edx, eax
mov dword [ebp - 0x144], edx
push 0x46cb60
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x140]
push eax
mov ecx, dword [ebp - 0x148]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x412a84
mov edx, dword [ebp - 0x148]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x55c]
push eax
call fcn.00415008
mov ecx, dword [ebp - 0x558]
push ecx
call fcn.00415008
mov eax, dword [ebp - 0x144]
mov esp, ebp
pop ebp
ret