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.0040d312
mov eax, dword [0x42c70c]
add esp, 0xc
test eax, eax
je 0x4010e1
mov ecx, dword [eax]
test ecx, ecx
je 0x4010b1
push ecx
call fcn.0040d43d
mov eax, dword [0x42c70c]
add esp, 4
mov dword [eax], ebx
mov eax, dword [0x42c70c]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x4010ce
push ecx
call fcn.0040d43d
mov eax, dword [0x42c70c]
add esp, 4
mov dword [eax + 4], ebx
mov eax, dword [0x42c70c]
test eax, eax
je 0x4010e1
push eax
call fcn.0040d43d
add esp, 4
mov dword [0x42c70c], ebx
push 8
call fcn.0040d458
xorps xmm0, xmm0
mov dword [0x42c70c], eax
mov edx, esi
lea ecx, [ebp - 0x288]
movq qword [eax], xmm0
call fcn.00402660
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.0040f154
add esp, 8
test eax, eax
je 0x40114d
mov byte [eax], bl
lea eax, [ebp - 0x158]
push 0x5c
push eax
call fcn.0040ea40
mov edx, eax
add esp, 8
test edx, edx
jne 0x4011a5
lea eax, [ebp - 0x158]
push 0x5d
push eax
call fcn.0040f154
mov edx, eax
add esp, 8
test edx, edx
jne 0x4011a5
lea eax, [ebp - 0x158]
push 0x2f
push eax
call fcn.0040ea40
mov edx, eax
add esp, 8
test edx, edx
jne 0x4011a5
lea eax, [ebp - 0x158]
push 0x3a
push eax
call fcn.0040ea40
add esp, 8
mov edx, eax
imul eax, dword [0x42c71c], 0x1f4
lea ecx, [ebp - 0x158]
add eax, 0x42d2d8
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.004023f0
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 [0x42f30c]
mov esi, eax
cmp esi, 0xffffffff
je 0x4015ae
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov dword [ebp - 0x3dc], eax
call fcn.0040d41c
mov ecx, dword [ebp - 0x3dc]
add esp, 4
add ecx, 1
mov eax, 0xffffffff
cmovo ecx, eax
push ecx
push 0
call fcn.0040b053
add esp, 8
mov dword [ebp - 0x3e8], eax
call fcn.0040d409
cmp dword [eax], 0xc
je 0x4015a3
mov eax, dword [ebp - 0x3e8]
test eax, eax
je 0x4015a3
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 0x4015a3
mov eax, dword [ebp - 0x3dc]
cmp eax, dword [ebp - 0x28c]
jne 0x4015a3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0x3e0], eax
mov ecx, 0x3e8
cmp ebx, 1
je 0x401563
mov edi, dword [ebp - 0x3e0]
xor eax, eax
mov dword [ebp - 0x3d8], eax
movzx esi, byte [edi + 0x427f50]
mov bl, byte [esi + 0x427f50]
nop dword [eax + eax]
add eax, esi
add eax, edi
cdq
idiv ecx
movzx eax, bl
movzx ecx, byte [edx + 0x427f50]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x427f50]
mov byte [ebp + eax - 0x28], bl
inc eax
add eax, esi
add eax, edi
cdq
idiv ecx
movzx eax, bl
movzx ecx, byte [edx + 0x427f50]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x427f50]
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 + 0x427f50]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x427f50]
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 + 0x427f50]
imul eax, ecx
mov ecx, 0x3e8
add eax, esi
cdq
idiv ecx
mov eax, dword [ebp - 0x3d8]
mov esi, edx
mov bl, byte [esi + 0x427f50]
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.00403050
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40153c
push 0
call fcn.0040d41c
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.0040b053
mov esi, eax
call fcn.0040d409
push ebx
cmp dword [eax], 0xc
cmovne edi, esi
push edi
mov dword [ebp - 0x3d4], edi
lea eax, [edi + 4]
push eax
call fcn.00408d50
add esp, 0x14
mov dword [edi], ebx
mov eax, dword [0x42c70c]
mov dword [ebp - 0x3d8], eax
call fcn.00406100
mov ebx, eax
test ebx, ebx
je 0x401583
push 0
mov edx, edi
mov dword [edi], 0
call fcn.00404a60
mov esi, eax
add esp, 4
test esi, esi
je 0x4014f3
push ecx
mov edx, str._::_0x
mov ecx, esi
call fcn.004023f0
add esp, 4
test eax, eax
je 0x4014f3
test esi, esi
je 0x4014e1
push esi
call fcn.0040d43d
add esp, 4
push 0
mov edx, edi
call fcn.00404a60
mov esi, eax
add esp, 4
test esi, esi
jne 0x4014c0
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x401511
push 0
push 1
push dword [ebp - 0x3d8]
mov edx, edi
xor ecx, ecx
push eax
call fcn.00404c70
add esp, 0x10
mov eax, dword [ebx + 4]
test eax, eax
je 0x401528
push 1
push dword [ebp - 0x3d8]
push edi
push 0
call eax
add esp, 0x10
test esi, esi
je 0x401535
push esi
call fcn.0040d43d
add esp, 4
mov ebx, 1
jmp 0x401545
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 0x4015ae
push edi
call fcn.0040d43d
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d18
mov esp, ebp
pop ebp
ret
push edi
call fcn.0040d43d
mov eax, dword [ebp - 0x3e4]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d18
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4015ae
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.00407d18
mov esp, ebp
pop ebp
ret