Function at 0x4060b0
Capabilities:
Access peb ldr_data
Check if file exists
Enumerate files on windows
Get file attributes
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x3d4
mov dword [ebp - 0x3b8], eax
mov eax, dword [sym.imp.msvcrt.dll_strlen]
mov dword [ebp - 0x39c], edx
mov dword [esp], edx
mov dword [ebp - 0x394], eax
call eax
mov ecx, 0x41631d
mov edx, eax
mov eax, esi
add eax, 0x104
add esi, edx
mov dword [ebp - 0x3bc], eax
mov eax, 0x104
sub eax, edx
mov edx, esi
cmp eax, 1
ja 0x406115
jmp 0x40611c
sub eax, 1
add edx, 1
add ecx, 1
mov byte [edx - 1], bl
cmp eax, 1
je 0x406510
movzx ebx, byte [ecx]
test bl, bl
jne 0x406100
test eax, eax
jne 0x406510
lea eax, [ebp - 0x28c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x39c]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_FindFirstFileA]
mov dword [ebp - 0x3c8], eax
call eax
sub esp, 8
mov edi, eax
cmp eax, 0xffffffff
je 0x406462
lea eax, [esi + 1]
lea esi, [ebp - 0x260]
mov dword [ebp - 0x3c0], eax
lea esi, [esi]
cmp word [esi], 0x2e
je 0x406438
cmp word [esi], 0x2e2e
je 0x406470
mov eax, dword [ebp - 0x3bc]
mov edx, dword [ebp - 0x3c0]
mov ecx, esi
sub eax, edx
cmp eax, 1
ja 0x4061ad
jmp 0x4061b4
sub eax, 1
add edx, 1
add ecx, 1
mov byte [edx - 1], bl
cmp eax, 1
je 0x406500
movzx ebx, byte [ecx]
test bl, bl
jne 0x406198
test eax, eax
jne 0x406500
mov ebx, dword [ebp - 0x39c]
mov dword [esp], ebx
mov eax, dword [ebp - 0x394]
call eax
lea ecx, [ebx + eax]
mov edx, eax
mov eax, 0x104
sub eax, edx
mov dword [ebp - 0x3a4], ecx
mov edx, ecx
mov ecx, 0x41631d
cmp eax, 1
ja 0x406205
jmp 0x40620c
sub eax, 1
add edx, 1
add ecx, 1
mov byte [edx - 1], bl
cmp eax, 1
je 0x4064f0
movzx ebx, byte [ecx]
test bl, bl
jne 0x4061f0
test eax, eax
jne 0x4064f0
lea eax, [ebp - 0x14c]
lea ebx, [ebp - 0x120]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x39c]
mov dword [esp], eax
mov eax, dword [ebp - 0x3c8]
call eax
mov ecx, dword [ebp - 0x3a4]
mov dword [ebp - 0x398], eax
sub esp, 8
add ecx, 1
mov dword [ebp - 0x3ac], ecx
cmp eax, 0xffffffff
je 0x406438
mov dword [ebp - 0x3c4], edi
jmp 0x4063ff
mov eax, dword [ebp - 0x3a4]
mov byte [eax + 1], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str._s_s.dll
mov eax, dword [ebp - 0x3ac]
mov dword [esp], eax
call fcn.00405d90
mov eax, dword [ebp - 0x39c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
je 0x4064a8
mov dword [esp + 4], 0x5f
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
je 0x4063df
cmp byte [eax + 1], 0x5f
mov byte [eax], 0
lea edi, [eax + 1]
je 0x406480
lea eax, [ebp - 0x390]
mov dword [esp + 4], edi
mov dword [ebp - 0x3a0], eax
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcpy]
mov dword [esp + 4], 0x5f
mov eax, dword [ebp - 0x3a0]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strchr]
mov byte [eax], 0
mov dword [esp], edi
mov dword [esp + 4], 0x5f
call dword [sym.imp.msvcrt.dll_strchr]
add eax, 1
mov dword [ebp - 0x3a8], eax
mov dword [esp], esi
mov edi, dword [ebp - 0x394]
call edi
mov dword [ebp - 0x3b0], eax
mov dword [esp], ebx
call edi
mov edx, dword [ebp - 0x3a0]
mov edi, eax
mov dword [esp], edx
mov ecx, dword [ebp - 0x394]
call ecx
mov edx, dword [ebp - 0x3a8]
mov dword [ebp - 0x3b4], eax
mov dword [esp], edx
mov ecx, dword [ebp - 0x394]
call ecx
mov edx, dword [ebp - 0x3b0]
mov ecx, eax
lea edx, [edx + edi + 0x36]
mov edi, dword [ebp - 0x3b4]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
add edx, edi
add edx, ecx
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, dword [ebp - 0x3a8]
sub esp, 0xc
mov edi, eax
lea eax, [eax + 8]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x3a0]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edx
mov dword [esp + 8], esi
mov dword [esp + 4], str._s__Version_s__Culture_s__PublicKeyToken_s
mov dword [esp], eax
call fcn.00405d90
mov ecx, dword [ebp - 0x3b8]
mov eax, dword [ecx + 4]
mov dword [edi], ecx
mov dword [edi + 4], eax
mov dword [eax], edi
mov dword [ecx + 4], edi
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x398]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindNextFileA]
sub esp, 8
test eax, eax
je 0x406420
cmp word [ebx], 0x2e
je 0x4063df
cmp word [ebx], 0x2e2e
jne 0x406268
cmp byte [ebx + 2], 0
je 0x4063df
jmp 0x406268
mov eax, dword [ebp - 0x398]
mov edi, dword [ebp - 0x3c4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
lea eax, [ebp - 0x28c]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindNextFileA]
sub esp, 8
test eax, eax
jne 0x406168
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [esi + 2], 0
je 0x406438
jmp 0x40617d
mov dword [ebp - 0x390], 0x7475656e
lea eax, [ebp - 0x390]
mov dword [ebp - 0x3a0], eax
mov dword [ebp - 0x38c], 0x6c6172
jmp 0x406307
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str._s_s.exe
mov eax, dword [ebp - 0x3ac]
mov dword [esp], eax
call fcn.00405d90
mov eax, dword [ebp - 0x39c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
jne 0x4062ab
jmp 0x4063df
mov byte [edx], 0
jmp 0x406214
mov byte [edx], 0
jmp 0x4061bc
mov byte [edx], 0
jmp 0x406124