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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd0
push ebx
push esi
push edi
xor ebx, ebx
push 0x40
lea eax, [ebp - 0x50]
push ebx
push eax
call fcn.0040d7e0
push dword [ebp + 0x10]
call fcn.004144a0
add esp, 0x10
lea eax, [ebp - 0x50]
push 0x419414
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x50]
push eax
call esi
lea eax, [ebp - 0x50]
push 0x419410
push eax
call esi
lea eax, [ebp - 0x50]
push eax
call fcn.0040d8f0
push dword [ebp + 0x10]
mov edi, eax
inc edi
call fcn.0040d8f0
pop ecx
inc eax
pop ecx
mov dword [ebp - 0x10], eax
push ebx
push ebx
push 3
push ebx
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x4043f6
cmp eax, ebx
je 0x4043f6
push ebx
push eax
mov dword [ebp - 8], ebx
mov dword [ebp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0xc], esi
je 0x4043ed
add eax, 3
and al, 0xfc
call fcn.0040d320
cmp esp, ebx
mov dword [ebp - 4], esp
je 0x4043ed
lea eax, [ebp - 8]
push ebx
push eax
push esi
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4043ed
mov esi, dword [ebp - 4]
mov eax, esi
cmp byte [eax], bl
je 0x4043ed
inc dword [ebp + 0xc]
cmp byte [esi], 0x5b
jne 0x4043e8
push 0x40
lea eax, [ebp - 0x90]
push ebx
push eax
call fcn.0040d7e0
add esp, 0xc
lea eax, [ebp - 0x90]
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x90]
push eax
call fcn.00414410
pop ecx
test eax, eax
pop ecx
je 0x404403
inc esi
cmp byte [esi], bl
jne 0x4043a9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lea esp, [ebp - 0xdc]
pop edi
pop esi
pop ebx
leave
ret
cmp byte [esi], 0xa
je 0x40440e
inc esi
inc dword [ebp + 0xc]
jmp 0x404403
movsx eax, byte [esi]
push eax
call fcn.0040d970
mov edi, dword [ebp + 0x10]
pop ecx
movsx ecx, byte [edi]
cmp eax, ecx
je 0x404432
inc dword [ebp + 0xc]
inc esi
movsx eax, byte [esi]
push eax
call fcn.0040d970
pop ecx
jmp 0x40441b
push 0x40
lea eax, [ebp - 0xd0]
push ebx
push eax
call fcn.0040d7e0
add esp, 0xc
lea eax, [ebp - 0xd0]
push dword [ebp - 0x10]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0xd0]
push edi
push eax
call fcn.00414410
pop ecx
test eax, eax
pop ecx
je 0x40446e
inc esi
inc dword [ebp + 0xc]
jmp 0x40440e
dec dword [ebp + 0xc]
push ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push ebx
push eax
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp + 0xc]
push dword [ebp - 4]
push dword [ebp + 8]
call edi
cmp byte [esi], 0xa
je 0x40449e
inc dword [ebp + 0xc]
inc esi
jmp 0x404493
lea eax, [ebp - 8]
push ebx
push eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
dec eax
inc esi
push eax
push esi
push dword [ebp + 8]
call edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop eax
jmp 0x4043f8