Function at 0x409fae
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], esi
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 0x18]
call fcn.00409dcd
push esi
push 0x80
push 3
push esi
push esi
push 0xd0000000
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x40a179
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
mov dword [ebp - 4], ebx
call esi
push dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
call esi
mov esi, dword [ebp - 0x1c]
push ebx
mov edi, eax
mov eax, dword [0x4339ac]
push 8
push dword [eax]
sub esi, edi
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
and dword [ebp - 0x24], 0
push 0
lea ecx, [ebp - 0x24]
push ecx
push ebx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor ecx, ecx
mov dword [ebp - 0x20], ebx
xor eax, eax
sub dword [ebp - 0x20], edi
mov dword [ebp - 8], ecx
js 0x40a090
xor edx, edx
test edi, edi
jle 0x40a07e
mov ebx, dword [ebp - 0x10]
add ecx, ebx
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
mov cl, byte [ecx + edx]
mov ebx, dword [ebp + 0xc]
cmp cl, byte [edx + ebx]
jne 0x40a078
inc edx
cmp edx, edi
jl 0x40a065
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
cmp edx, edi
jne 0x40a087
inc eax
lea ecx, [ecx + edi - 1]
inc ecx
cmp ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
jle 0x40a057
imul eax, esi
add eax, ebx
push eax
mov dword [ebp - 0x2c], eax
mov eax, dword [0x4339ac]
push 8
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
xor esi, esi
xor eax, eax
cmp ebx, esi
mov dword [ebp - 8], ecx
jle 0x40a11c
mov dword [ebp - 4], ecx
test edi, edi
jle 0x40a0de
mov ecx, dword [ebp - 0x10]
add ecx, eax
mov dword [ebp - 0xc], ecx
cmp eax, dword [ebp - 0x20]
jg 0x40a0de
mov ecx, dword [ebp - 0xc]
mov cl, byte [ecx]
mov edx, dword [ebp + 0xc]
cmp cl, byte [esi + edx]
jne 0x40a0de
inc esi
inc dword [ebp - 0xc]
cmp esi, edi
jl 0x40a0c4
cmp esi, edi
jne 0x40a107
xor esi, esi
cmp dword [ebp - 0x1c], esi
jle 0x40a0fb
mov ecx, dword [ebp + 8]
mov cl, byte [esi + ecx]
mov edx, dword [ebp - 4]
mov byte [edx + esi], cl
inc esi
cmp esi, dword [ebp - 0x1c]
jl 0x40a0e9
mov ecx, dword [ebp - 0x1c]
add dword [ebp - 4], ecx
lea eax, [eax + edi - 1]
jmp 0x40a115
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov cl, byte [eax + ecx]
inc dword [ebp - 4]
mov byte [edx], cl
inc eax
xor esi, esi
cmp eax, ebx
jl 0x40a0b8
push esi
push esi
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x24], esi
push dword [ebp - 8]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a14a
mov dword [ebp - 0x28], 1
cmp dword [ebp - 8], esi
je 0x40a160
push dword [ebp - 8]
mov eax, dword [0x4339ac]
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x10], esi
je 0x40a177
push dword [ebp - 0x10]
mov eax, dword [0x4339ac]
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
cmp dword [ebp - 0x14], esi
je 0x40a187
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0x1f
jle 0x409fc2
cmp dword [ebp - 0x28], esi
je 0x40a1c2
push 0x42c8d0
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x10
push str.NezuVirtualUSB
lea eax, [ebp - 0x234]
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40a1c5
xor esi, esi
inc esi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8