Function at 0x404d80
Capabilities:
Enumerate files on windows
Get file size
Print debug messages
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x104b0
call fcn.004119a0
mov eax, dword [0x41b004]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov ebx, ecx
lea edi, [ebx + 2]
push edi
push 0x41cdfc
lea ecx, [ebp - 0x114]
push 0x417c5c
push ecx
mov dword [ebp - 0x1048c], eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x404ddb
mov al, 0x5c
cmp byte [ebx + esi + 1], al
je 0x404ddb
dec esi
jne 0x404dd2
push 0x104
lea edx, [ebp - 0x324]
push 0
push edx
call fcn.0040fab0
add esp, 0xc
push esi
lea eax, [ebp - 0x324]
push edi
push eax
call fcn.0040af50
add esp, 0xc
lea ecx, [ebp - 0x10464]
push ecx
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
mov dword [ebp - 0x10470], esi
cmp esi, 0xffffffff
jne 0x404e47
mov eax, dword [0x41bdc4]
push 0x30
push ebx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x10468], eax
mov dword [ebp - 0x10478], eax
jmp 0x404e60
mov ecx, 0x41854c
lea eax, [ebp - 0x10438]
jmp 0x404e70
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404e90
test dl, dl
je 0x404e8c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404e90
add eax, 2
add ecx, 2
test dl, dl
jne 0x404e70
xor eax, eax
jmp 0x404e95
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4051c9
mov ecx, 0x418550
lea eax, [ebp - 0x10438]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404ec8
test dl, dl
je 0x404ec4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404ec8
add eax, 2
add ecx, 2
test dl, dl
jne 0x404ea8
xor eax, eax
jmp 0x404ecd
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4051c9
test byte [ebp - 0x10464], 0x10
jne 0x4051c9
mov dword [ebp - 0x10474], 0xa
mov esi, 1
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [ebp - 0x10438]
push ecx
lea edx, [ebp - 0x324]
push edx
lea eax, [ebp - 0x114]
push str._s_s
push eax
call ebx
mov edi, dword [ebp - 0x1048c]
mov edx, edi
lea ecx, [ebp - 0x114]
call fcn.004047f0
lea ecx, [ebp - 0x114]
push ecx
push 0x41cdfc
lea edx, [ebp - 0x21c]
push 0x417c5c
push edx
mov dword [ebp - 0x10488], eax
call ebx
add esp, 0x20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1047c], eax
cmp eax, 0xffffffff
jne 0x404fd6
mov eax, dword [ebp - 0x10474]
mov ecx, eax
dec eax
mov dword [ebp - 0x10474], eax
test ecx, ecx
jne 0x4051bb
push 0x46
lea ecx, [ebp - 0x114]
call fcn.00404200
mov edx, dword [0x41bdc4]
mov eax, dword [0x41cd90]
add esp, 4
push 0x30
lea ecx, [ebp - 0x21c]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 0x10470]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x114]
push edx
push 0x41d434
lea eax, [ebp - 0x21c]
push 0x417c5c
push eax
call ebx
add esp, 0x10
xor esi, esi
push esi
push 0x80
push 2
push esi
push 2
push 0x40000000
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [ebp - 0x1047c]
push esi
push ebx
mov dword [ebp - 0x1046c], eax
mov dword [ebp - 0x10484], esi
mov dword [ebp - 0x10480], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov edx, esi
sub edx, dword [edi + 8]
mov dword [edi + 8], edx
test esi, esi
je 0x405154
push 0
lea eax, [ebp - 0x10490]
push eax
push 0xfffc
lea ecx, [ebp - 0x10324]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4051fd
mov eax, dword [ebp - 0x10490]
add dword [ebp - 0x10468], eax
sub esi, eax
cmp dword [ebp - 0x10488], 0
je 0x4050db
xor ecx, ecx
test eax, eax
je 0x4050db
mov edx, dword [edi + 0xc]
test edx, edx
je 0x4050a6
cmp edx, dword [ebp - 0x10484]
jne 0x4050a6
mov dword [ebp - 0x10478], 0xc
dec dword [ebp - 0x10478]
jmp 0x4050c5
cmp dword [ebp - 0x10478], 0
je 0x4050b7
dec dword [ebp - 0x10478]
jmp 0x4050c5
movzx edx, byte [ebp + ecx - 0x10324]
add dword [ebp - 0x10480], edx
inc dword [ebp - 0x10484]
dec dword [edi + 8]
je 0x4050d5
inc ecx
cmp ecx, eax
jb 0x405085
mov ebx, dword [ebp - 0x1047c]
push 0
lea ecx, [ebp - 0x10494]
push ecx
push eax
mov eax, dword [ebp - 0x1046c]
lea edx, [ebp - 0x10324]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40525b
mov ecx, dword [ebp - 0x10468]
xor edx, edx
add ecx, dword [ebp + 8]
adc edx, dword [ebp + 0xc]
push edx
push ecx
call fcn.004043a0
add esp, 8
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x104b0]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40514c
lea ecx, [ebp - 0x104b0]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [ebp - 0x104b0]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
test esi, esi
jne 0x405044
cmp dword [ebp - 0x10488], 0
je 0x405197
mov eax, dword [ebp - 0x10480]
cmp dword [edi + 4], eax
je 0x40518a
mov esi, 1
sub dword [ebp - 0x10474], esi
je 0x4052b9
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub dword [ebp - 0x10468], eax
jmp 0x4051a9
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x46
lea ecx, [ebp - 0x114]
call fcn.00404200
add esp, 4
xor esi, esi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call edi
mov edx, dword [ebp - 0x1046c]
push edx
call edi
test esi, esi
jne 0x404ef1
mov esi, dword [ebp - 0x10470]
lea eax, [ebp - 0x10464]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404e60
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x10468]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
push 0x46
lea ecx, [ebp - 0x114]
call fcn.00404200
mov eax, dword [0x41bdcc]
mov ecx, dword [0x41cd90]
add esp, 4
push 0x30
lea edx, [ebp - 0x21c]
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov edx, dword [ebp - 0x1046c]
push edx
call esi
mov eax, dword [ebp - 0x10470]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
push 0x46
lea ecx, [ebp - 0x114]
call fcn.00404200
mov edx, dword [0x41bdc8]
mov eax, dword [0x41cd90]
add esp, 4
push 0x30
lea ecx, [ebp - 0x21c]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov ecx, dword [ebp - 0x1046c]
push ecx
call esi
mov edx, dword [ebp - 0x10470]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
push 0x46
lea ecx, [ebp - 0x114]
call fcn.00404200
mov ecx, dword [0x41bdd0]
mov edx, dword [0x41cd90]
add esp, 4
push 0x30
lea eax, [ebp - 0x21c]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov eax, dword [ebp - 0x1046c]
push eax
call esi
mov ecx, dword [ebp - 0x10470]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0040aabb
mov esp, ebp
pop ebp
ret