Function at 0x4ad970
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x520d50
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x20], ebx
lea edi, [ebx + 4]
mov esi, edi
mov dword [esp + 0x30], esi
test esi, esi
je 0x4ad9c7
mov eax, dword [esi]
test eax, eax
je 0x4ad9c7
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x68], 0
cmp dword [ebx + 0x18], 0
jne 0x4adce3
lea eax, [esp + 0x34]
mov ecx, ebx
push eax
call fcn.004ae6d0
mov byte [esp + 0x68], 1
cmp dword [esp + 0x44], 0
je 0x4adcb3
xorps xmm0, xmm0
push 0
movq qword [esp + 0x1c], xmm0
push 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
call fcn.004aef10
mov dword [esp + 0x18], eax
mov byte [esp + 0x68], 4
lea edx, [ebx + 8]
lea eax, [esp + 0x18]
mov dword [esp + 0x10], edx
cmp eax, edx
je 0x4ada4b
mov eax, dword [edx]
mov ecx, dword [esp + 0x18]
mov dword [edx], ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], ecx
mov dword [edx + 4], eax
jmp 0x4ada4f
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4adc63
cmp dword [esp + 0x48], 8
lea eax, [esp + 0x34]
push 0
cmovae eax, dword [esp + 0x38]
push 0x80
push 4
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x14], 0
jmp 0x4ada90
mov eax, dword [esp + 0x20]
cmp byte [eax], 0
jne 0x4adaec
cmp ebx, 0xffffffff
jne 0x4adaf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x4adc3d
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x48], 8
lea eax, [esp + 0x34]
push 0
cmovae eax, dword [esp + 0x38]
push 0x80
push 4
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [esp + 0x14]
mov ebx, eax
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, 0xa
jb 0x4ada90
cmp ebx, 0xffffffff
je 0x4adc3d
test ebx, ebx
je 0x4adc3d
test esi, esi
je 0x4adb14
mov eax, dword [esi]
test eax, eax
je 0x4adb0e
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor esi, esi
mov dword [esp + 0x30], esi
xorps xmm0, xmm0
mov dword [esp + 0x2c], 0
movq qword [esp + 0x24], xmm0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov byte [esp + 0x68], 5
lea edx, [esp + 0x24]
lea ecx, [esp + 0x18]
call fcn.004b40c0
xorps xmm0, xmm0
mov dword [esp + 0x54], 0
movq qword [esp + 0x4c], xmm0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov byte [esp + 0x68], 6
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
je 0x4adbb4
push 0
lea edx, [esp + 0x24]
mov dword [esp + 0x24], 0
push edx
sub ecx, eax
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4adc05
mov dword [esp + 0x20], edi
test edi, edi
je 0x4adbc9
mov eax, dword [edi]
test eax, eax
je 0x4adbc9
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x68], 7
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push edx
mov eax, dword [ecx]
push dword [edx]
push dword [eax]
lea eax, [esp + 0x1c]
push eax
call fcn.004af000
mov byte [esp + 0x68], 6
test edi, edi
je 0x4adc05
mov eax, dword [edi]
test eax, eax
je 0x4adbfd
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x20], 0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x68], 4
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4adc63
push eax
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
jmp 0x4adc63
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
cmp edx, eax
je 0x4adc63
mov ecx, dword [edx]
mov eax, dword [esp + 0x18]
mov dword [edx], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], ecx
mov ecx, dword [edx + 4]
mov dword [edx + 4], eax
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x68], 8
mov eax, dword [esp + 0x18]
mov ebx, dword [eax]
mov dword [eax], eax
mov eax, dword [esp + 0x18]
mov dword [eax + 4], eax
mov dword [esp + 0x1c], 0
cmp ebx, dword [esp + 0x18]
je 0x4adca1
mov edi, dword [ebx]
lea ecx, [ebx + 8]
call fcn.004acb10
push ebx
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ebx, edi
cmp edi, dword [esp + 0x18]
jne 0x4adc85
mov byte [esp + 0x68], 1
push dword [esp + 0x18]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov byte [esp + 0x68], 0
cmp dword [esp + 0x48], 8
jb 0x4adccc
push dword [esp + 0x34]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], 0
mov word [esp + 0x34], ax
mov dword [esp + 0x68], 0xffffffff
test esi, esi
je 0x4add04
mov eax, dword [esi]
test eax, eax
je 0x4adcfc
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x30], 0
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00505b1e
mov esp, ebp
pop ebp
ret