Function at 0x524ec0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x60b4e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x80], esi
test edi, edi
je 0x5251d2
cmp esi, 1
jl 0x5251d2
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x84], ebx
cmp ebx, 0xffffffff
je 0x5251d2
push 0
lea eax, [ebp - 8]
mov dword [ebp - 0x10], 0x10000
push eax
push 6
lea eax, [ebp - 0x10]
mov word [ebp - 0xc], si
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 1
push 0
mov eax, esi
shl eax, 4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor ecx, ecx
mov eax, esi
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0056181a
mov ebx, dword [sym.imp.GDI32.dll_GetObjectW]
add esp, 4
mov dword [ebp - 0x90], eax
test esi, esi
jle 0x52509e
mov ecx, edi
mov esi, eax
mov edi, dword [ebp - 0x84]
sub ecx, eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x7c]
push eax
push dword [ecx + esi]
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x525082
lea eax, [ebp - 0x28]
push eax
push 0x18
push dword [ebp - 0x6c]
call ebx
test eax, eax
je 0x525082
lea eax, [ebp - 0x40]
push eax
push 0x18
push dword [ebp - 0x70]
call ebx
test eax, eax
je 0x525082
push 1
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [ebp - 0x1c]
mov dword [esi], eax
test bl, 3
je 0x524fee
add ebx, 4
and ebx, 0xfffffffc
mov edx, dword [ebp - 0x34]
test dl, 3
je 0x524ffc
add edx, 4
and edx, 0xfffffffc
mov ecx, dword [ebp - 0x20]
xorps xmm0, xmm0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x64], eax
push 0
lea eax, [ecx + ecx]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x60], eax
movzx eax, word [ebp - 0x18]
mov word [ebp - 0x5c], ax
movzx eax, word [ebp - 0x16]
mov word [ebp - 0x5a], ax
mov eax, dword [ebp - 0x38]
imul eax, edx
imul ecx, ebx
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x48], xmm0
mov dword [ebp - 0x68], 0x28
add eax, ecx
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x10]
push eax
push 0x28
lea eax, [ebp - 0x68]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x6c]
push edi
call fcn.005251f0
push dword [ebp - 0x70]
push edi
call fcn.005251f0
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
add esp, 0x10
push dword [ebp - 0x6c]
call ebx
push dword [ebp - 0x70]
call ebx
mov ebx, dword [sym.imp.GDI32.dll_GetObjectW]
mov ecx, dword [ebp - 8]
add esi, 4
sub dword [ebp - 0x8c], 1
jne 0x524f96
mov edi, dword [ebp - 0x88]
mov esi, dword [ebp - 0x80]
push 0
push 0
push 6
push dword [ebp - 0x84]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
jle 0x5251a2
mov eax, dword [ebp - 0x90]
sub eax, edi
mov dword [ebp - 8], eax
mov eax, dword [eax + edi]
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x3c]
push eax
push dword [edi]
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x5250f6
lea eax, [ebp - 0x28]
push eax
push 0x18
push dword [ebp - 0x2c]
call ebx
test eax, eax
je 0x5250f6
lea eax, [ebp - 0x58]
push eax
push 0x18
push dword [ebp - 0x30]
call ebx
mov eax, dword [ebp - 0x1c]
test al, 3
je 0x525103
add eax, 4
and eax, 0xfffffffc
mov ecx, dword [ebp - 0x4c]
test cl, 3
je 0x525111
add ecx, 4
and ecx, 0xfffffffc
mov edx, dword [ebp - 0x50]
imul eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x16]
imul edx, ecx
add edx, eax
cmp si, 8
jb 0x52512a
xor ebx, ebx
jmp 0x525137
mov ecx, dword [ebp - 0x18]
mov ebx, 1
imul ecx, esi
shl ebx, cl
mov al, byte [ebp - 0x24]
mov byte [ebp - 0x78], al
mov eax, dword [ebp - 0x20]
mov byte [ebp - 0x77], al
mov eax, dword [ebp - 0x18]
mov word [ebp - 0x74], ax
lea eax, [edx + 0x28]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x88]
push 0
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x10]
push eax
push 0x10
lea eax, [ebp - 0x78]
mov byte [ebp - 0x76], bl
push eax
push dword [ebp - 0x84]
mov byte [ebp - 0x75], 0
mov word [ebp - 0x72], si
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x2c]
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
call ebx
push dword [ebp - 0x30]
call ebx
mov ebx, dword [sym.imp.GDI32.dll_GetObjectW]
add edi, 4
sub dword [ebp - 0x80], 1
mov eax, dword [ebp - 8]
jne 0x5250c3
push dword [ebp - 0x90]
call fcn.00561815
add esp, 4
push dword [ebp - 0x84]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055a658
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055a658
mov esp, ebp
pop ebp
ret