Function at 0x40e038
Capabilities:
Enumerate files on windows
Enumerate files recursively
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x30
push 0
push 0
dec ecx
jne 0x40e040
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403a84
xor eax, eax
push ebp
push 0x40e5fc
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00408b38
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0x154]
mov ecx, 0x40e614
mov edx, dword [ebp - 4]
call fcn.004038e0
mov eax, dword [ebp - 0x154]
call fcn.00403a94
push eax
call sub.kernel32.dll_FindFirstFileA
mov esi, eax
mov eax, 0x41db54
mov edx, 0x40e620
call fcn.00403770
cmp esi, 0xffffffff
je 0x40e5cb
lea eax, [ebp - 8]
lea edx, [ebp - 0x124]
mov ecx, 0x104
call fcn.0040387c
test byte [ebp - 0x150], 0x10
je 0x40e11b
mov eax, dword [ebp - 8]
mov edx, 0x40e6cc
call fcn.004039e0
je 0x40e5b6
mov eax, dword [ebp - 8]
mov edx, 0x40e6d8
call fcn.004039e0
je 0x40e5b6
push dword [ebp - 4]
push dword [ebp - 8]
push 0x40e6e4
lea eax, [ebp - 0x158]
mov edx, 3
call fcn.00403954
mov eax, dword [ebp - 0x158]
call fcn.0040e038
jmp 0x40e5b6
cmp word [0x41c298], 0
jne 0x40e12b
inc dword [0x41db80]
mov eax, dword [0x41db80]
cmp eax, dword [0x41db7c]
jl 0x40e5b6
lea eax, [ebp - 0x15c]
push eax
mov eax, dword [ebp - 8]
call fcn.00403894
mov edx, eax
sub edx, 2
mov ecx, 3
mov eax, dword [ebp - 8]
call fcn.00403af4
mov eax, dword [ebp - 0x15c]
lea edx, [ebp - 0xc]
call fcn.004053bc
mov edx, dword [0x41db48]
mov eax, dword [ebp - 0xc]
call fcn.00403b7c
test eax, eax
je 0x40e181
mov bl, 3
jmp 0x40e183
mov bl, 1
mov eax, 0x41db54
mov edx, 0x40e6f0
call fcn.00403770
cmp bl, 3
jne 0x40e25b
mov eax, dword [0x41db44]
call fcn.00403894
test eax, eax
jne 0x40e1b0
mov bl, 2
jmp 0x40e25b
mov edi, dword [ebp - 0x130]
cmp edi, 0x9600000
jbe 0x40e1c5
mov bl, 2
jmp 0x40e25b
mov eax, dword [ebp - 0xc]
mov edx, 0x40e7bc
call fcn.004039e0
jne 0x40e204
cmp edi, 0x7530
jae 0x40e1e0
mov bl, 2
jmp 0x40e25b
lea eax, [ebp - 0x160]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004038e0
mov eax, dword [ebp - 0x160]
call fcn.004056ac
test al, al
jne 0x40e25b
mov bl, 2
jmp 0x40e25b
mov edx, dword [ebp - 8]
mov eax, 0x40e7c8
call fcn.00403b7c
test eax, eax
je 0x40e25b
mov edx, dword [ebp - 8]
mov eax, 0x40e7d8
call fcn.00403b7c
test eax, eax
jne 0x40e25b
mov edx, dword [ebp - 8]
mov eax, 0x40e7ec
call fcn.00403b7c
test eax, eax
jne 0x40e25b
mov edx, dword [ebp - 8]
mov eax, 0x40e800
call fcn.00403b7c
test eax, eax
jne 0x40e25b
mov edx, dword [ebp - 8]
mov eax, 0x40e818
call fcn.00403b7c
test eax, eax
jne 0x40e25b
mov bl, 2
mov eax, 0x41db54
mov edx, 0x40e830
call fcn.00403770
cmp bl, 3
jne 0x40e301
inc word [0x41c298]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0040d838
test al, al
je 0x40e2b7
mov eax, 0x41db60
mov edx, dword [ebp - 4]
call fcn.00403770
lea eax, [ebp - 0x164]
mov ecx, 0x40e6e4
mov edx, dword [0x41db40]
call fcn.004038e0
mov eax, dword [ebp - 0x164]
call fcn.0040e038
push dword [0x41db20]
push 0x40e850
lea edx, [ebp - 0x16c]
movzx eax, word [0x41c298]
call fcn.00405338
push dword [ebp - 0x16c]
push 0x40e85c
lea eax, [ebp - 0x168]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0x168]
call fcn.00405864
dec word [0x41c298]
mov eax, 0x41db54
mov edx, 0x40e86c
call fcn.00403770
xor eax, eax
cmp bl, 1
jne 0x40e571
cmp dword [0x41db8c], 0x64
setl dl
sub dl, 1
jb 0x40e36a
jne 0x40e37c
mov edx, 0x40e8e0
mov eax, dword [ebp - 0xc]
call fcn.00403b7c
test eax, eax
jle 0x40e341
mov al, 1
jmp 0x40e37c
mov edx, 0x40e93c
mov eax, dword [ebp - 0xc]
call fcn.00403b7c
test eax, eax
jle 0x40e356
xor eax, eax
jmp 0x40e37c
cmp dword [ebp - 0x130], 0xa00000
ja 0x40e366
mov al, 1
jmp 0x40e37c
xor eax, eax
jmp 0x40e37c
mov edx, 0x40e8e0
mov eax, dword [ebp - 0xc]
call fcn.00403b7c
test eax, eax
setg al
test al, al
je 0x40e571
lea eax, [ebp - 0x170]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004038e0
mov eax, dword [ebp - 0x170]
lea edx, [ebp - 0x10]
call fcn.0040c504
mov eax, dword [ebp - 0x10]
call fcn.00403894
test eax, eax
jle 0x40e571
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
mov eax, dword [0x41db10]
call fcn.00403a94
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [0x41dba8], eax
push 2
push 0
push 0
mov eax, dword [0x41dba8]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
mov eax, dword [0x41dba8]
push eax
call sub.kernel32.dll_GetFileSize_1
mov dword [0x41db90], eax
cmp dword [0x41db90], 0xed800
jle 0x40e4c1
push 0x40ea94
lea edx, [ebp - 0x178]
mov eax, dword [0x41db90]
call fcn.00405338
push dword [ebp - 0x178]
push 0x40eaa8
lea edx, [ebp - 0x17c]
mov eax, 0xed800
call fcn.00405338
push dword [ebp - 0x17c]
lea eax, [ebp - 0x174]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0x174]
call fcn.0041a4a8
push 0xc8
mov ecx, 0x40eab4
mov edx, 0x40eac4
mov eax, 0x80000002
call fcn.00406aec
push 0x40eb0c
mov edx, 0x40eac4
mov ecx, 0x40eb18
mov eax, 0x80000002
call fcn.004069fc
push 0
mov edx, 0x40eac4
mov ecx, 0x40eb28
mov eax, 0x80000002
call fcn.00406aec
push 0
mov edx, 0x40eac4
mov ecx, 0x40eb38
mov eax, 0x80000002
call fcn.00406aec
call fcn.004035b0
cmp word [0x41c298], 0
jne 0x40e4ed
push 0x40eb48
push dword [ebp - 4]
push dword [ebp - 8]
push 0x40eb48
push dword [ebp - 0x10]
lea eax, [ebp - 0x10]
mov edx, 5
call fcn.00403954
jmp 0x40e538
push 0x40eb48
lea edx, [ebp - 0x180]
movzx eax, word [0x41c298]
call fcn.00405338
push dword [ebp - 0x180]
push 0x40eb54
push dword [0x41db60]
push dword [0x41db50]
push 0x40eb60
push dword [ebp - 8]
push 0x40eb48
push dword [ebp - 0x10]
lea eax, [ebp - 0x10]
mov edx, 9
call fcn.00403954
push 0
push 0x41db98
mov eax, dword [ebp - 0x10]
call fcn.00403894
push eax
lea eax, [ebp - 0x10]
call fcn.00403aec
push eax
mov eax, dword [0x41dba8]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, dword [0x41dba8]
push eax
call sub.kernel32.dll_CloseHandle_1
lea eax, [ebp - 0x10]
xor edx, edx
call fcn.00403bc4
cmp word [0x41c298], 0
jne 0x40e5b6
mov edx, 0x40eb28
mov ecx, dword [0x41db80]
mov eax, dword [0x41dbb8]
call fcn.00406d7c
lea eax, [ebp - 0x184]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004038e0
mov ecx, dword [ebp - 0x184]
mov edx, 0x40eb18
mov eax, dword [0x41dbb8]
call fcn.00406cd0
lea eax, [ebp - 0x150]
push eax
push esi
call sub.kernel32.dll_FindNextFileA
test eax, eax
jne 0x40e0ae
push esi
call sub.kernel32.dll_FindClose
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e603
lea eax, [ebp - 0x184]
mov edx, 0xd
call fcn.00403740
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.00403740
ret