Function at 0x408a40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x4d044c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
mov esi, dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x40]
and eax, 1
or ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x4c]
mov edi, dword [esi + eax*4 + 0x38]
xor eax, 1
mov eax, dword [esi + eax*4 + 0x38]
mov eax, dword [eax + 0xc]
cmp eax, edx
cmovae edx, eax
mov eax, ecx
and eax, 0x50000
mov dword [ebp - 0x60], eax
test ecx, 0x80000
je 0x408b2a
mov dword [edi + 0xc], edx
mov eax, dword [ebx + 0x2c]
movups xmm0, xmmword [eax]
movups xmmword [edi + 0x10], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [edi + 0x20], xmm0
mov eax, dword [eax + 0x18]
mov dword [edi + 0x28], eax
mov eax, dword [ebx + 0x2c]
movups xmm0, xmmword [eax + 0x1c]
movups xmmword [edi + 0x2c], xmm0
movq xmm0, qword [eax + 0x2c]
movq qword [edi + 0x3c], xmm0
mov eax, dword [eax + 0x34]
mov dword [edi + 0x44], eax
mov eax, dword [ebx + 8]
dec eax
cmp dword [ebp - 0x60], 0
mov dword [edi + 0x48], eax
mov eax, dword [ebx + 0xc]
mov dword [edi + 0x4c], eax
jne 0x408c2a
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
shr eax, 0x14
not eax
and eax, 1
mov dword [ebp - 0x5c], eax
lea eax, [edi - 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
test eax, eax
jne 0x408c2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5c], eax
or dword [esi + 0xc], 0x80000000
mov eax, dword [ebp - 0x5c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004606ac
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x4c]
mov ecx, dword [ebx + 0x2c]
mov dword [ebp - 0x7c], eax
mov eax, dword [edi + 0x48]
mov dword [ebp - 0x4c], edx
movups xmm0, xmmword [ecx]
mov dword [ebp - 0x64], eax
movups xmmword [ebp - 0x48], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [ebp - 0x38], xmm0
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x30], eax
movups xmm0, xmmword [ecx + 0x1c]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [ecx + 0x2c]
movq qword [ebp - 0x1c], xmm0
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 8]
dec eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0xc], eax
sub edi, dword [esi + 0x30]
add edi, 0xc
cmp dword [ebp - 0x60], 0
je 0x408b88
mov eax, dword [esi]
jmp 0x408b8b
mov eax, dword [esi + 8]
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x70], edi
push ecx
lea ecx, [ebp - 0x5c]
xorps xmm0, xmm0
push ecx
push 0x44
lea ecx, [ebp - 0x4c]
movlpd qword [ebp - 0x78], xmm0
push ecx
push eax
movlpd qword [ebp - 0x6c], xmm0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408bc3
mov dword [ebp - 0x5c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x408bdc
mov eax, dword [ebp - 0x5c]
cmp eax, 0x44
je 0x408c2a
test eax, eax
jns 0x408bd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x408bdc
mov eax, 5
mov dword [ebp - 0x5c], eax
xorps xmm0, xmm0
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x78]
push eax
push 0
push 0x44
lea eax, [ebp - 0x4c]
movlpd qword [ebp - 0x78], xmm0
push eax
movlpd qword [ebp - 0x6c], xmm0
mov dword [ebp - 0x70], edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
or dword [esi + 0xc], 0x80000000
mov eax, dword [ebp - 0x5c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004606ac
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x408c37
mov eax, dword [ebx + 0xc]
mov dword [ecx + 8], eax
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004606ac
mov esp, ebp
pop ebp
ret