Function at 0x4052e0
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, 0x104b4
call fcn.00419d10
mov eax, dword [0x424008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10474], edx
lea eax, [ebp - 0x110]
lea ebx, [edi + 2]
push ebx
push 0x42520c
push 0x42086c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x40533c
nop dword [eax]
cmp byte [edi + esi + 1], 0x5c
je 0x40533c
sub esi, 1
jne 0x405330
push 0x104
lea eax, [ebp - 0x320]
push 0
push eax
call fcn.0040bb50
add esp, 0xc
lea eax, [ebp - 0x320]
push esi
push ebx
push eax
call fcn.0040cfc0
add esp, 0xc
lea eax, [ebp - 0x10460]
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
mov dword [ebp - 0x10470], esi
cmp esi, 0xffffffff
jne 0x4053aa
push 0x30
push edi
push dword [0x4207cc]
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
xor edi, edi
movlpd qword [ebp - 0x10490], xmm0
mov ebx, dword [ebp - 0x1048c]
mov dword [ebp - 0x1046c], ebx
mov ebx, dword [ebp - 0x10490]
mov dword [ebp - 0x10468], ebx
nop
mov ecx, 0x4211c4
lea eax, [ebp - 0x10434]
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405400
test dl, dl
je 0x4053fc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405400
add eax, 2
add ecx, 2
test dl, dl
jne 0x4053e0
xor eax, eax
jmp 0x405405
sbb eax, eax
or eax, 1
test eax, eax
je 0x40577d
mov ecx, 0x4211c8
lea eax, [ebp - 0x10434]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405438
test dl, dl
je 0x405434
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405438
add eax, 2
add ecx, 2
test dl, dl
jne 0x405418
xor eax, eax
jmp 0x40543d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40577d
test byte [ebp - 0x10460], 0x10
jne 0x40577d
mov ebx, dword [ebp - 0x10474]
mov esi, 1
mov dword [ebp - 0x10478], 0xa
nop word [eax + eax]
lea eax, [ebp - 0x10434]
push eax
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x110]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, ebx
lea ecx, [ebp - 0x110]
call fcn.00404d20
mov dword [ebp - 0x1048c], eax
lea eax, [ebp - 0x110]
push eax
push 0x42520c
lea eax, [ebp - 0x218]
push 0x42086c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
lea eax, [ebp - 0x218]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x10464], eax
cmp eax, 0xffffffff
jne 0x40554e
mov ecx, dword [ebp - 0x10478]
mov eax, ecx
dec ecx
mov dword [ebp - 0x10478], ecx
test eax, eax
jne 0x40576f
mov dl, 0x46
lea ecx, [ebp - 0x110]
call fcn.00404810
push 0x30
lea eax, [ebp - 0x218]
push eax
push dword [0x4207cc]
push dword [0x425188]
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 0x10470]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x110]
push eax
push 0x425854
lea eax, [ebp - 0x218]
push 0x42086c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x218]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor esi, esi
mov dword [ebp - 0x1047c], eax
push esi
push dword [ebp - 0x10464]
mov dword [ebp - 0x10488], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [ebp - 0x10480], eax
sub ecx, dword [ebx + 8]
xor edx, edx
mov dword [ebx + 8], ecx
mov ecx, eax
or ecx, edx
mov dword [ebp - 0x10484], edx
je 0x4056f8
nop dword [eax]
mov ebx, dword [ebp - 0x10464]
lea eax, [ebp - 0x10494]
push 0
push eax
push 0xfffc
lea eax, [ebp - 0x10320]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405811
mov ebx, dword [ebp - 0x10494]
add dword [ebp - 0x10468], ebx
adc dword [ebp - 0x1046c], 0
sub dword [ebp - 0x10480], ebx
sbb dword [ebp - 0x10484], 0
cmp dword [ebp - 0x1048c], 0
je 0x405669
xor eax, eax
test ebx, ebx
je 0x405669
mov ecx, dword [ebp - 0x10474]
mov edx, dword [ecx + 0xc]
test edx, edx
je 0x405642
cmp edx, esi
jne 0x405642
mov edi, 0xc
dec edi
jmp 0x40565d
test edi, edi
je 0x405649
dec edi
jmp 0x40565d
movzx ecx, byte [ebp + eax - 0x10320]
add dword [ebp - 0x10488], ecx
mov ecx, dword [ebp - 0x10474]
inc esi
add dword [ecx + 8], 0xffffffff
je 0x405669
inc eax
cmp eax, ebx
jb 0x405632
push 0
lea eax, [ebp - 0x10498]
push eax
push ebx
mov ebx, dword [ebp - 0x1047c]
lea eax, [ebp - 0x10320]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4057b7
mov ecx, dword [ebp - 0x10468]
add ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x1046c]
adc eax, dword [ebp + 0xc]
push eax
push ecx
call fcn.004049a0
add esp, 8
lea eax, [ebp - 0x104b4]
push 1
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4056de
lea eax, [ebp - 0x104b4]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x104b4]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov eax, dword [ebp - 0x10480]
mov edx, dword [ebp - 0x10484]
or eax, edx
jne 0x4055d0
mov ebx, dword [ebp - 0x10474]
cmp dword [ebp - 0x1048c], 0
je 0x405748
mov eax, dword [ebp - 0x10488]
cmp dword [ebx + 4], eax
je 0x40573b
sub dword [ebp - 0x10478], 1
je 0x40586b
push 0
push dword [ebp - 0x10464]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub dword [ebp - 0x10468], eax
mov esi, 1
sbb dword [ebp - 0x1046c], 0
jmp 0x405757
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dl, 0x46
lea ecx, [ebp - 0x110]
call fcn.00404810
xor esi, esi
push dword [ebp - 0x10464]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1047c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x405470
mov esi, dword [ebp - 0x10470]
lea eax, [ebp - 0x10460]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4053d0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x10468]
mov edx, dword [ebp - 0x1046c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
mov dl, 0x46
lea ecx, [ebp - 0x110]
call fcn.00404810
push 0x30
lea eax, [ebp - 0x218]
push eax
push dword [0x4207d0]
push dword [0x425188]
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 0x10464]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
push dword [ebp - 0x10470]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
mov dl, 0x46
lea ecx, [ebp - 0x110]
call fcn.00404810
push 0x30
lea eax, [ebp - 0x218]
push eax
push dword [0x4207d4]
push dword [0x425188]
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x1047c]
call ebx
push dword [ebp - 0x10470]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
xor edx, edx
pop ebx
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
mov dl, 0x46
lea ecx, [ebp - 0x110]
call fcn.00404810
push 0x30
lea eax, [ebp - 0x218]
push eax
push dword [0x4207d8]
push dword [0x425188]
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 0x10464]
jmp 0x40583a