Function at 0x401050
Capabilities:
Enumerate files on windows
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3ec
mov eax, dword [0x42b040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
lea eax, [ebp - 0x158]
push esi
push 0x12c
xor edi, edi
xor ebx, ebx
push eax
mov dword [ebp - 0x3d4], edi
mov dword [ebp - 0x3e4], ebx
call fcn.0040d562
mov eax, dword [0x42d2e4]
add esp, 0xc
test eax, eax
je 0x4010e1
mov ecx, dword [eax]
test ecx, ecx
je 0x4010b1
push ecx
call fcn.0040d68d
mov eax, dword [0x42d2e4]
add esp, 4
mov dword [eax], ebx
mov eax, dword [0x42d2e4]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x4010ce
push ecx
call fcn.0040d68d
mov eax, dword [0x42d2e4]
add esp, 4
mov dword [eax + 4], ebx
mov eax, dword [0x42d2e4]
test eax, eax
je 0x4010e1
push eax
call fcn.0040d68d
add esp, 4
mov dword [0x42d2e4], ebx
push 8
call fcn.0040d6a8
xorps xmm0, xmm0
mov dword [0x42d2e4], eax
mov edx, esi
lea ecx, [ebp - 0x288]
movq qword [eax], xmm0
call fcn.00402650
add esp, 4
test esi, esi
jne 0x401110
mov byte [ebp - 0x158], bl
jmp 0x40114d
lea edx, [ebp - 0x158]
mov ecx, esi
sub edx, esi
nop word [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x401120
cmp byte [ebp - 0x158], 0x22
jne 0x40114d
lea eax, [ebp - 0x157]
push 0x22
push eax
call fcn.0040f3a4
add esp, 8
test eax, eax
je 0x40114d
mov byte [eax], bl
lea eax, [ebp - 0x158]
push 0x5c
push eax
call fcn.0040ec90
mov edx, eax
add esp, 8
test edx, edx
jne 0x4011a5
lea eax, [ebp - 0x158]
push 0x5d
push eax
call fcn.0040f3a4
mov edx, eax
add esp, 8
test edx, edx
jne 0x4011a5
lea eax, [ebp - 0x158]
push 0x2f
push eax
call fcn.0040ec90
mov edx, eax
add esp, 8
test edx, edx
jne 0x4011a5
lea eax, [ebp - 0x158]
push 0x3a
push eax
call fcn.0040ec90
add esp, 8
mov edx, eax
imul eax, dword [0x42d2f4], 0x1f4
lea ecx, [ebp - 0x158]
add eax, 0x42deb0
cmp ecx, eax
je 0x4011da
test edx, edx
lea ecx, [edx + 1]
lea eax, [ebp - 0x158]
cmove ecx, eax
mov edx, eax
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x4011d0
lea eax, [ebp - 0x3d0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401254
nop
test byte [ebp - 0x3d0], 0x10
jne 0x401212
push ecx
lea edx, [ebp - 0x158]
lea ecx, [ebp - 0x3a4]
call fcn.004023e0
add esp, 4
test eax, eax
je 0x401226
lea eax, [ebp - 0x3d0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4011f0
jmp 0x40124d
lea eax, [ebp - 0x3a4]
push eax
lea eax, [ebp - 0x288]
push eax
push str._s_s
lea eax, [ebp - 0x158]
push 0x12c
push eax
call fcn.00401010
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x158]
push eax
call dword [0x42fed0]
mov esi, eax
cmp esi, 0xffffffff
je 0x4015b4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov dword [ebp - 0x3dc], eax
call fcn.0040d66c
mov ecx, dword [ebp - 0x3dc]
add esp, 4
add ecx, 1
mov eax, 0xffffffff
cmovo ecx, eax
push ecx
push 0
call fcn.0040b2a3
add esp, 8
mov dword [ebp - 0x3e8], eax
call fcn.0040d659
cmp dword [eax], 0xc
je 0x4015a9
mov eax, dword [ebp - 0x3e8]
test eax, eax
je 0x4015a9
push 0
lea ecx, [ebp - 0x28c]
push ecx
push dword [ebp - 0x3dc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4015a9
mov eax, dword [ebp - 0x3dc]
cmp eax, dword [ebp - 0x28c]
jne 0x4015a9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0x3e0], eax
mov ecx, 0x3e8
cmp ebx, 1
je 0x401569
mov edi, dword [ebp - 0x3e0]
xor eax, eax
mov dword [ebp - 0x3d8], eax
movzx esi, byte [edi + 0x42bac0]
mov bl, byte [esi + 0x42bac0]
nop dword [eax + eax]
add eax, esi
add eax, edi
cdq
idiv ecx
movzx eax, bl
movzx ecx, byte [edx + 0x42bac0]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x42bac0]
mov byte [ebp + eax - 0x28], bl
inc eax
add eax, esi
add eax, edi
cdq
idiv ecx
movzx eax, bl
movzx ecx, byte [edx + 0x42bac0]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x42bac0]
mov byte [ebp + eax - 0x27], bl
add eax, 2
add eax, esi
add eax, edi
cdq
idiv ecx
movzx eax, bl
movzx ecx, byte [edx + 0x42bac0]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x42bac0]
mov byte [ebp + eax - 0x26], bl
add eax, 3
add eax, esi
add eax, edi
cdq
idiv ecx
movzx eax, bl
movzx ecx, byte [edx + 0x42bac0]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x42bac0]
mov byte [ebp + eax - 0x25], bl
add eax, 4
mov dword [ebp - 0x3d8], eax
cmp eax, 0x20
jl 0x401340
mov edx, dword [ebp - 0x3dc]
lea eax, [ebp - 0x28]
push ecx
mov ecx, dword [ebp - 0x3e8]
push eax
lea eax, [ebp - 0x3d4]
mov byte [ebp - 8], 0
push eax
call fcn.00403040
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x401542
push 0
call fcn.0040d66c
mov edi, dword [ebp - 0x3d4]
add esp, 4
mov ecx, ebx
mov eax, 0xffffffff
add ecx, 4
cmovb ecx, eax
push ecx
push edi
call fcn.0040b2a3
mov esi, eax
call fcn.0040d659
push ebx
cmp dword [eax], 0xc
cmovne edi, esi
push edi
mov dword [ebp - 0x3d4], edi
lea eax, [edi + 4]
push eax
call fcn.00408fa0
add esp, 0x14
mov dword [edi], ebx
mov eax, dword [0x42d2e4]
xor esi, esi
mov dword [ebp - 0x3d8], eax
call fcn.00406350
mov ebx, eax
test ebx, ebx
je 0x401589
mov dword [edi], esi
cmp byte [str._::_0x], 0
je 0x4014f9
push esi
mov edx, edi
call fcn.00404cb0
mov esi, eax
add esp, 4
test esi, esi
je 0x4014f9
push ecx
mov edx, str._::_0x
mov ecx, esi
call fcn.004023e0
add esp, 4
test eax, eax
je 0x4014f9
test esi, esi
je 0x4014e7
push esi
call fcn.0040d68d
add esp, 4
push 0
mov edx, edi
call fcn.00404cb0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4014c6
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x401517
push 0
push 1
push dword [ebp - 0x3d8]
mov edx, edi
xor ecx, ecx
push eax
call fcn.00404ec0
add esp, 0x10
mov eax, dword [ebx + 4]
test eax, eax
je 0x40152e
push 1
push dword [ebp - 0x3d8]
push edi
push 0
call eax
add esp, 0x10
test esi, esi
je 0x40153b
push esi
call fcn.0040d68d
add esp, 4
mov ebx, 1
jmp 0x40154b
mov edi, dword [ebp - 0x3d4]
or ebx, 0xffffffff
mov eax, dword [ebp - 0x3e0]
inc eax
mov dword [ebp - 0x3e4], ebx
mov dword [ebp - 0x3e0], eax
cmp eax, 0x3e8
jl 0x401312
test edi, edi
je 0x4015b4
push edi
call fcn.0040d68d
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407f68
mov esp, ebp
pop ebp
ret
push edi
call fcn.0040d68d
mov eax, dword [ebp - 0x3e4]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407f68
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4015b4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407f68
mov esp, ebp
pop ebp
ret