Function at 0x4a8660
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x51e080]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x220], 0
push edi
mov eax, dword [esi + 4]
add eax, 0x14
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x210], eax
call eax
mov ecx, esi
call fcn.004a8490
mov edi, dword [esi + 0x34]
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x214], eax
test edi, edi
je 0x4a8a56
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x22c], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x230], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x224], eax
nop word [eax + eax]
mov ebx, dword [esi + 0x30]
mov ecx, dword [ebx + 0x14]
test cl, 0x20
je 0x4a8702
mov eax, dword [esi + 4]
add eax, 0x14
push eax
call dword [ebp - 0x214]
push 0xc8
jmp 0x4a8843
mov eax, ecx
and al, 3
cmp al, 2
jne 0x4a8a56
mov edx, dword [edi + 0x14]
mov eax, edx
and al, 3
cmp al, 2
jne 0x4a8a56
test dl, 0x10
je 0x4a8a56
test cl, 8
jne 0x4a8a0e
test dl, 8
jne 0x4a8a0e
or ecx, 0x20
lea eax, [ebx + 0x18]
mov dword [ebx + 0x14], ecx
mov ecx, esi
mov edx, dword [esi + 0x14]
push eax
mov edx, dword [edx + 8]
call fcn.004a8540
mov eax, dword [esi + 4]
add esp, 4
add eax, 0x14
push eax
call dword [ebp - 0x214]
mov eax, dword [ebp - 0x220]
push 0
push 0x80
neg eax
push 4
push 0
sbb eax, eax
and eax, 7
push eax
push 0x40000000
push dword [esi + 0x20]
call dword [ebp - 0x230]
mov dword [ebp - 0x218], eax
cmp eax, 0xffffffff
jne 0x4a88ca
mov edi, dword [esi + 8]
push dword [edi + 0x1c]
call dword [ebp - 0x224]
cmp eax, 0xffffffff
je 0x4a88b1
mov dword [edi + 0x20], 0
mov edi, dword [ebp - 0x220]
test edi, edi
je 0x4a8814
mov eax, dword [esi]
lea edx, [ebp - 0x228]
push 0x1cc15274
push edx
mov eax, dword [eax + 0x478]
mov dword [ebp - 0x218], eax
mov ecx, dword [eax + 0x6c]
mov eax, dword [ecx]
call dword [eax]
test eax, eax
jne 0x4a8814
push edi
push dword [ebp - 0x228]
lea eax, [ebp - 0x208]
push 0xffffffffffffffff
push 0x100
push eax
call fcn.00415570
mov ecx, dword [ebp - 0x218]
lea eax, [ebp - 0x208]
add esp, 0x14
push eax
push 0xbcd3f497
call fcn.0045bc70
mov eax, dword [esi + 4]
inc edi
add eax, 0x14
mov dword [ebp - 0x220], edi
push eax
call dword [ebp - 0x210]
and dword [ebx + 0x14], 0xffffffdf
cmp edi, 3
jg 0x4a8873
mov eax, dword [esi + 4]
add eax, 0x14
push eax
call dword [ebp - 0x214]
push 0x3e8
call dword [ebp - 0x22c]
mov eax, dword [esi + 4]
add eax, 0x14
push eax
call dword [ebp - 0x210]
mov ecx, esi
call fcn.004a8490
mov edi, dword [esi + 0x34]
mov dword [ebp - 0x21c], edi
test edi, edi
jne 0x4a86e0
jmp 0x4a8a56
mov ecx, dword [esi + 4]
push ebx
call fcn.004a7cb0
mov eax, dword [esi + 4]
add eax, 0x14
push eax
call dword [ebp - 0x214]
push dword [esi + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call edi
push dword [esi + 0x20]
call edi
push dword [esi + 0x24]
call edi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3878
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x20], 1
mov eax, dword [esi + 4]
add eax, 0x14
push eax
call dword [ebp - 0x210]
jmp 0x4a8a52
mov eax, dword [edi + 0x48]
lea edx, [edi + 0x48]
and eax, dword [edx + 4]
mov dword [ebp - 0x224], edx
cmp eax, 0xffffffff
jne 0x4a88f3
mov eax, dword [ebx + 0x48]
mov ecx, dword [ebx + 0x4c]
mov dword [edx], eax
mov eax, dword [edi + 0x3c]
mov dword [edx + 4], ecx
add dword [ebx + 0x48], eax
adc dword [ebx + 0x4c], 0
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x20c], 1
push eax
push 0x20
lea eax, [ebx + 0x18]
push eax
call fcn.004b2070
lea eax, [ebp - 0x20c]
push eax
push 0x20
lea eax, [edi + 0x18]
push eax
call fcn.004b2070
lea eax, [ebp - 0x20c]
push eax
push 8
lea eax, [edi + 0x48]
push eax
call fcn.004b2070
lea eax, [ebp - 0x20c]
add edi, 0x3c
push eax
push 4
push edi
mov dword [ebp - 0x228], edi
call fcn.004b2070
mov edi, dword [edi]
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [ebp - 0x21c]
push edi
push dword [eax + 0x38]
call fcn.004b2070
mov ecx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x20c]
mov dword [ecx + 0x40], eax
cmp dword [esi + 0x4c], edi
jae 0x4a899a
push dword [esi + 0x48]
call fcn.004d9a63
mov edi, dword [ebp - 0x228]
add esp, 4
push dword [edi]
call fcn.004d9a7e
mov dword [esi + 0x48], eax
add esp, 4
mov eax, dword [edi]
mov dword [esi + 0x4c], eax
mov eax, dword [ebp - 0x224]
mov edi, dword [ebp - 0x21c]
mov ecx, dword [esi + 0x5c]
push dword [eax + 4]
mov edx, dword [edi + 0x38]
push dword [eax]
push dword [edi + 0x40]
push dword [edi + 0x3c]
push dword [esi + 0x48]
call fcn.004bd590
add esp, 0x14
push 0
push 0
push dword [edi + 0x4c]
push dword [edi + 0x48]
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x234]
push eax
push dword [edi + 0x3c]
push dword [esi + 0x48]
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 4]
add eax, 0x14
push eax
call dword [ebp - 0x210]
jmp 0x4a8a14
or ecx, 0x20
mov dword [ebx + 0x14], ecx
mov eax, dword [esi + 0x14]
test byte [eax + 4], 2
je 0x4a8a4e
mov ecx, dword [esi + 4]
mov eax, dword [edi + 0x3c]
sub dword [ecx + 0x4c], eax
push dword [edi + 0x38]
mov eax, dword [esi + 4]
push 0
push dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [edi + 0x38], 0
mov ecx, dword [esi + 4]
push edi
call fcn.004a6da0
mov dword [edi + 0x14], 0x17
or dword [edi + 0x14], 8
and dword [ebx + 0x14], 0xffffffdf
mov eax, dword [esi + 4]
add eax, 0x14
push eax
call dword [ebp - 0x214]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d3878
mov esp, ebp
pop ebp
ret