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

Disassembly:
sub esp, 0x370
mov eax, dword [0x438e28]
xor eax, esp
mov dword [esp + 0x36c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x37c]
push esi
push edi
push 0x43c320
mov dword [esp + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x405799
xor al, al
jmp 0x405b73
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
xor esi, esi
push esi
push esi
push 0x186
push ebp
call edi
push esi
push esi
push 0x184
push ebp
call edi
xor eax, eax
jmp 0x4057c0
mov cl, byte [eax + 0x43c320]
mov byte [esp + eax + 0x168], cl
inc eax
test cl, cl
jne 0x4057c0
mov cl, 0x5c
cmp byte [0x43c320], cl
jne 0x4057eb
cmp byte [0x43c321], cl
jne 0x4057eb
mov eax, 2
jmp 0x4057ed
xor eax, eax
cmp byte [esp + eax + 0x168], 0
je 0x405813
cmp byte [esp + eax + 0x168], cl
jne 0x405808
mov byte [esp + eax + 0x168], 0
inc eax
cmp byte [esp + eax + 0x168], 0
jne 0x4057f7
mov byte [esp + eax + 0x169], 0
cmp byte [esp + 0x168], 0
mov dword [esp + 0x1c], esi
je 0x405906
lea ebx, [esp + 0x168]
test esi, esi
jne 0x4058b6
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x168]
mov byte [esp + eax + 0x270], cl
inc eax
test cl, cl
jne 0x405840
lea eax, [esp + 0x270]
push eax
call fcn.0042a541
lea edi, [esp + 0x274]
add esp, 4
dec edi
jmp 0x405870
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405870
mov cx, word [0x433824]
lea edx, [esp + 0x270]
push edx
push 0xffffffffffffffff
push 0x181
push ebp
mov word [edi], cx
call dword [sym.imp.USER32.dll_SendMessageA]
movzx ecx, word [esp + 0x1c]
shl ecx, 0x10
push ecx
push eax
push 0x19a
push ebp
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x4058d8
push ebx
push 0xffffffffffffffff
push 0x181
push ebp
call edi
movzx edx, word [esp + 0x1c]
movzx ecx, si
shl edx, 0x10
or edx, ecx
push edx
push eax
push 0x19a
push ebp
call edi
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4058e0
add dword [esp + 0x1c], 4
sub eax, edx
lea esi, [esi + eax + 1]
cmp byte [esp + esi + 0x168], cl
lea ebx, [esp + esi + 0x168]
jne 0x405834
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov esi, dword [sym.imp.USER32.dll_SetCursor]
push eax
call esi
lea edx, [esp + 0x28]
push edx
mov edi, eax
push 0x433558
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x405941
push edi
call esi
jmp 0x405b71
push 1
call fcn.0041835e
add esp, 4
mov edi, eax
xor ebp, ebp
nop
mov ecx, 0x433828
lea eax, [esp + 0x54]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405980
test dl, dl
je 0x40597c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405980
add eax, 2
add ecx, 2
test dl, dl
jne 0x405960
xor eax, eax
jmp 0x405985
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405a0a
mov ecx, 0x43382c
lea eax, [esp + 0x54]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4059b6
test dl, dl
je 0x4059b2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4059b6
add eax, 2
add ecx, 2
test dl, dl
jne 0x405996
xor eax, eax
jmp 0x4059bb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405a0a
test byte [esp + 0x28], 0x10
je 0x405a0a
inc ebp
lea esi, [ebp*4]
push esi
push edi
call fcn.00418732
mov edi, eax
lea eax, [esp + 0x5c]
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4059e1
sub eax, edx
inc eax
push eax
call fcn.0041835e
add esp, 4
mov dword [esi + edi - 4], eax
lea ecx, [esp + 0x54]
mov edx, eax
mov edi, edi
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x405a00
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405950
push ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, dword [esp + 0x18]
dec eax
xor ebp, ebp
xor ebx, ebx
test eax, eax
jle 0x405b06
lea esp, [esp]
mov eax, dword [esp + 0x14]
mov edi, dword [eax + ebx*4 + 4]
mov esi, dword [eax + ebx*4]
push edi
push esi
call fcn.004264c7
add esp, 8
test eax, eax
jle 0x405af0
lea edx, [esp + 0x168]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405a78
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405a87
sub eax, edx
inc eax
push eax
push esi
call fcn.00418732
mov esi, dword [esp + 0x1c]
add esp, 8
mov dword [esi + ebx*4], eax
mov ecx, edi
mov edx, eax
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x405aa6
lea eax, [esp + 0x168]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405ac0
sub eax, edx
inc eax
push eax
push edi
call fcn.00418732
add esp, 8
mov dword [esi + ebx*4 + 4], eax
lea ecx, [esp + 0x168]
mov edx, eax
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x405ae1
mov ebp, 1
mov eax, dword [esp + 0x18]
inc ebx
dec eax
cmp ebx, eax
jl 0x405a50
test ebp, ebp
jne 0x405a38
xor esi, esi
cmp dword [esp + 0x18], esi
jle 0x405b49
movzx edi, word [esp + 0x1c]
mov ebp, dword [esp + 0x24]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
shl edi, 0x10
or edi, 0xffff
mov edx, dword [esp + 0x14]
mov eax, dword [edx + esi*4]
push eax
push 0xffffffffffffffff
push 0x181
push ebp
call ebx
push edi
push eax
push 0x19a
push ebp
call ebx
inc esi
cmp esi, dword [esp + 0x18]
jl 0x405b26
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
xor esi, esi
test edi, edi
jle 0x405b68
mov ecx, dword [ebx + esi*4]
push ecx
call fcn.00418524
inc esi
add esp, 4
cmp esi, edi
jl 0x405b57
push ebx
call fcn.00418524
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x37c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004181f3
add esp, 0x370
ret