Function at 0x41b31e
Capabilities:
Clear file content
Get file size
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
xor eax, eax
or dword [ebp - 0xc], 0xffffffff
lea edi, [ebp - 0x4c]
or dword [ebp - 0x10], 0xffffffff
stosd dword es:[edi], eax
mov esi, ecx
mov edx, SysReAllocString
mov word [ebp - 4], 0xbbef
mov byte [ebp - 2], 0xbf
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0xc]
push eax
push ecx
push ecx
push 4
push ecx
push 7
mov ecx, 0x406154
mov dword [ebp - 8], edi
call fcn.0041b232
mov ebx, eax
test ebx, ebx
jns 0x41b38e
push ebx
call fcn.004321e3
jmp 0x41b706
push esi
mov dword [ebp - 0x3c], esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x41b3ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004324dd
mov ebx, eax
jmp 0x41b383
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x41b3bc
cmp esi, 0xffffffff
je 0x41b3bc
mov eax, esi
jmp 0x41b3be
xor eax, eax
lea ecx, [ebp - 0x4c]
push ecx
push 0
push 3
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x41b409
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x2c], edi
cmp eax, 0x3e5
jne 0x41b416
test esi, esi
je 0x41b3f2
cmp esi, 0xffffffff
je 0x41b3f2
mov eax, esi
jmp 0x41b3f4
xor eax, eax
push 1
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x4c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x41b39c
test esi, esi
je 0x41b434
cmp esi, 0xffffffff
je 0x41b434
mov eax, esi
jmp 0x41b436
test eax, eax
jg 0x41b41e
mov ebx, eax
jmp 0x41b427
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
jns 0x41b706
jmp 0x41b383
xor eax, eax
lea ecx, [ebp - 0x38]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x41b45e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004324dd
mov ebx, eax
push ebx
call fcn.004321e3
jmp 0x41b6ea
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
test eax, eax
jg 0x41b47e
jl 0x41b46e
test ecx, ecx
jne 0x41b473
xor ebx, ebx
push ebx
jmp 0x41b454
test eax, eax
jg 0x41b47e
jl 0x41b47e
cmp ecx, 4
ja 0x41b488
mov eax, 0x8000ffff
mov ebx, eax
push eax
jmp 0x41b454
test eax, eax
jne 0x41b47e
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
lea ecx, [ebp - 0x20]
call fcn.00433c1b
mov edi, dword [ebp - 0x20]
test edi, edi
jne 0x41b4bb
mov ebx, 0x8007000e
push ebx
call fcn.004321e3
jmp 0x41b6e7
test esi, esi
je 0x41b4c8
cmp esi, 0xffffffff
je 0x41b4c8
mov eax, esi
jmp 0x41b4ca
xor eax, eax
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x41b4ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004324dd
mov ebx, eax
jmp 0x41b4b0
test esi, esi
je 0x41b4fa
cmp esi, 0xffffffff
je 0x41b4fa
mov eax, esi
jmp 0x41b4fc
xor eax, eax
push 0
lea ecx, [ebp - 0x24]
push ecx
push dword [ebp - 0x38]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41b4dd
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0x24], eax
je 0x41b523
mov eax, 0x8000ffff
mov ebx, eax
push eax
jmp 0x41b4b1
mov cl, byte [edi]
cmp cl, 0xff
jne 0x41b6b1
cmp byte [edi + 1], 0xfe
jne 0x41b6b1
lea eax, [ebp - 0x10]
mov edx, 0xc0000000
push eax
push ecx
push ecx
push 2
push ecx
push 0
mov ecx, 0x40616c
call fcn.0041b232
mov ebx, eax
test ebx, ebx
js 0x41b4b0
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x41b56e
cmp esi, 0xffffffff
je 0x41b56e
mov eax, esi
xor ebx, ebx
jmp 0x41b572
xor ebx, ebx
mov eax, ebx
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x41b59d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004324dd
mov ebx, eax
push ebx
call fcn.004321e3
mov esi, dword [ebp - 0xc]
jmp 0x41b6e7
test esi, esi
je 0x41b5a8
mov eax, esi
cmp esi, 0xffffffff
jne 0x41b5aa
mov eax, ebx
push ebx
lea ecx, [ebp - 0x28]
push ecx
push 3
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41b581
mov eax, dword [ebp - 0x38]
lea edx, [edi + 2]
add eax, 0xfffffffe
test esi, esi
je 0x41b5d4
mov ecx, esi
cmp esi, 0xffffffff
jne 0x41b5d6
mov ecx, ebx
push ecx
lea edi, [ebp - 0x28]
push edi
push eax
call fcn.0041ae15
mov ebx, eax
test ebx, ebx
js 0x41b58f
test esi, esi
je 0x41b5f6
cmp esi, 0xffffffff
je 0x41b5f6
mov eax, esi
xor edi, edi
jmp 0x41b5fa
xor edi, edi
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x41b581
test esi, esi
je 0x41b61d
cmp esi, 0xffffffff
je 0x41b61d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00430c0c
mov ebx, eax
test ebx, ebx
js 0x41b58f
lea eax, [ebp - 0x18]
push eax
push edi
push 0x406138
push dword [ebp - 0x1c]
call fcn.004314b7
mov ebx, eax
test ebx, ebx
js 0x41b58f
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 8]
push eax
push edi
push 0x40616c
push esi
call fcn.004314b7
mov ebx, eax
test ebx, ebx
js 0x41b58f
lea eax, [ebp - 0x14]
push eax
push edi
push 0x406154
push esi
call fcn.004314b7
mov ebx, eax
test ebx, ebx
js 0x41b58f
push edi
push edi
push 3
push edi
mov edi, dword [ebp - 8]
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReplaceFileW]
test eax, eax
jne 0x41b6ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004324dd
mov ebx, eax
push ebx
call fcn.004321e3
mov esi, dword [ebp - 0xc]
jmp 0x41b6ea
cmp dword [ebp - 0x34], 0
jl 0x41b519
jg 0x41b6c6
cmp eax, 3
jb 0x41b519
cmp cl, byte [ebp - 4]
jne 0x41b519
mov al, byte [edi + 1]
cmp al, byte [ebp - 3]
jne 0x41b519
mov al, byte [edi + 2]
cmp al, byte [ebp - 2]
jne 0x41b519
mov edi, dword [ebp - 8]
test esi, esi
je 0x41b6f3
cmp esi, 0xffffffff
jne 0x41b6f5
xor esi, esi
lea eax, [ebp - 0x4c]
push eax
push 0
push 3
push 0
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
push ebx
call fcn.00432150
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x41b719
push eax
call fcn.0043220c
test edi, edi
je 0x41b723
push edi
call fcn.0043220c
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x41b730
push eax
call fcn.0043220c
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x41b73d
push eax
call fcn.0043220c
lea ecx, [ebp - 0x30]
call fcn.0042e8b9
lea ecx, [ebp - 0x20]
call fcn.0042e8b9
lea ecx, [ebp - 0x10]
call fcn.0043239d
lea ecx, [ebp - 0xc]
call fcn.0043239d
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret