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

Disassembly:
sub esp, 0x15c
mov eax, dword [0x438e28]
xor eax, esp
mov dword [esp + 0x154], eax
mov eax, dword [esp + 0x164]
push ebx
push ebp
push esi
push edi
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x408bbb
lea eax, [esp + 0x20]
push eax
xor edi, edi
push 0x4345f4
xor ebp, ebp
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
mov dword [esp + 0x18], esi
cmp esi, 0xffffffff
je 0x4089b7
mov ecx, dword [esp + 0x170]
cmp byte [ecx + 0xc], 0
je 0x4089b7
lea ebx, [ebx]
mov bl, byte [esp + 0x20]
test bl, 0x10
je 0x408998
mov ecx, 0x433828
lea eax, [esp + 0x4c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408876
test dl, dl
je 0x408872
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408876
add eax, 2
add ecx, 2
test dl, dl
jne 0x408856
xor eax, eax
jmp 0x40887b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408998
mov ecx, 0x43382c
lea eax, [esp + 0x4c]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4088b0
test dl, dl
je 0x4088ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4088b0
add eax, 2
add ecx, 2
test dl, dl
jne 0x408890
xor eax, eax
jmp 0x4088b5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408998
mov edx, dword [esp + 0x170]
cmp byte [edx + 0x27], 0
je 0x4088de
test bl, 2
jne 0x408998
cmp byte [esp + 0x4c], 0x2e
je 0x408998
push 0x258
test ebp, ebp
je 0x408904
mov esi, ebp
call fcn.0041882e
add esp, 4
test eax, eax
je 0x4088fe
call fcn.00408be0
mov dword [esi], eax
jmp 0x40891b
xor eax, eax
mov dword [esi], eax
jmp 0x40891b
call fcn.0041882e
add esp, 4
test eax, eax
je 0x408917
call fcn.00408be0
jmp 0x408919
xor eax, eax
mov edi, eax
mov ebp, eax
lea eax, [esp + 0x4c]
lea edx, [ebp + 5]
mov ecx, eax
mov dword [ebp], 0
mov byte [ebp + 4], 1
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408933
lea eax, [ebp + 5]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408943
sub eax, edx
mov dword [ebp + 0x208], eax
mov eax, dword [esp + 0x3c]
xor edx, edx
xor esi, esi
add edx, dword [esp + 0x40]
adc eax, esi
mov esi, dword [esp + 0x18]
mov dword [ebp + 0x210], edx
mov dword [ebp + 0x214], eax
mov edx, dword [esp + 0x34]
mov dword [ebp + 0x218], edx
mov eax, dword [esp + 0x38]
mov dword [ebp + 0x21c], eax
mov ecx, dword [esp + 0x24]
mov dword [ebp + 0x220], ecx
mov edx, dword [esp + 0x28]
mov dword [ebp + 0x224], edx
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x408840
push esi
mov dword [esp + 0x18], edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x20]
push ecx
push 0x4345f4
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x408bb9
mov edx, dword [esp + 0x170]
cmp byte [edx + 0xd], 0
je 0x408bb9
test byte [esp + 0x20], 0x10
jne 0x408b9e
lea eax, [esp + 0x4c]
push eax
call fcn.0040bea0
add esp, 4
test al, al
je 0x408b9e
mov ecx, dword [esp + 0x170]
cmp byte [ecx + 0x27], 0
je 0x408a26
test byte [esp + 0x20], 2
jne 0x408b9e
cmp byte [esp + 0x4c], 0x2e
je 0x408b9e
push 0x258
test ebp, ebp
je 0x408a4c
mov esi, ebp
call fcn.0041882e
add esp, 4
test eax, eax
je 0x408a46
call fcn.00408be0
mov dword [esi], eax
jmp 0x408a65
xor eax, eax
mov dword [esi], eax
jmp 0x408a65
call fcn.0041882e
add esp, 4
test eax, eax
je 0x408a5f
call fcn.00408be0
jmp 0x408a61
xor eax, eax
mov dword [esp + 0x14], eax
mov ebp, eax
lea eax, [esp + 0x4c]
lea edx, [ebp + 5]
mov ecx, eax
mov dword [ebp], 0
mov byte [ebp + 4], 0
sub edx, ecx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408a80
mov eax, dword [esp + 0x3c]
xor edx, edx
xor edi, edi
add edx, dword [esp + 0x40]
adc eax, edi
mov dword [ebp + 0x210], edx
mov dword [ebp + 0x214], eax
mov edx, dword [esp + 0x34]
mov dword [ebp + 0x218], edx
mov eax, dword [esp + 0x38]
mov dword [ebp + 0x21c], eax
mov ecx, dword [esp + 0x24]
mov dword [ebp + 0x220], ecx
mov edx, dword [esp + 0x28]
lea eax, [ebp + 5]
mov dword [ebp + 0x224], edx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ad2
sub eax, edx
cmp byte [eax + ebp + 5], 0x2e
je 0x408aee
test eax, eax
js 0x408af5
dec eax
cmp byte [ebp + eax + 5], 0x2e
jne 0x408ae2
test eax, eax
js 0x408af5
inc eax
jmp 0x408b09
lea eax, [ebp + 5]
lea edx, [eax + 1]
jmp 0x408b00
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408b00
sub eax, edx
mov dword [ebp + 0x208], eax
mov eax, dword [esp + 0x1c]
mov edx, 0x43d230
sub edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408b20
mov eax, 0x43d230
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408b32
sub eax, edx
cmp byte [eax + 0x43d22f], 0x5c
je 0x408b61
mov edi, 0x43d230
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408b50
mov ax, word [0x433824]
mov word [edi], ax
lea eax, [esp + 0x4c]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408b67
mov edi, 0x43d230
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408b78
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp + 0x228]
push ecx
call fcn.0040c4e0
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4089e3
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004181f3
add esp, 0x15c
ret