Function at 0x100163c3
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x94
push ebx
xor ebx, ebx
cmp dword [ebp + 0x7c], ebx
jne 0x100163dd
xor eax, eax
jmp 0x100165de
push edi
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp + 0x78]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp + 0x60], edi
jne 0x10016407
xor eax, eax
jmp 0x100165dd
push esi
lea eax, [ebp + 4]
push eax
push dword [ebp + 0x7c]
call dword [sym.imp.USER32.dll_GetIconInfo]
mov esi, dword [sym.imp.GDI32.dll_GetObjectW]
lea eax, [ebp + 0x48]
push eax
push 0x18
push dword [ebp + 0x14]
call esi
lea eax, [ebp + 0x18]
push eax
push 0x18
push dword [ebp + 0x10]
call esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp + 0x64]
push eax
push 6
lea eax, [ebp + 0x40]
push eax
push edi
mov word [ebp + 0x40], bx
mov word [ebp + 0x42], 1
mov word [ebp + 0x44], 1
call esi
mov al, byte [ebp + 0x4c]
mov cx, word [ebp + 0x5a]
mov edx, dword [ebp + 0x54]
mov byte [ebp + 0x30], al
mov eax, dword [ebp + 0x50]
mov word [ebp + 0x36], cx
imul edx, eax
mov ecx, dword [ebp + 0x20]
imul ecx, dword [ebp + 0x24]
mov byte [ebp + 0x31], al
lea eax, [ecx + edx + 0x28]
push ebx
mov dword [ebp + 0x38], eax
lea eax, [ebp + 0x64]
push eax
push 0x10
lea eax, [ebp + 0x30]
push eax
push edi
mov byte [ebp + 0x32], bl
mov byte [ebp + 0x33], bl
mov word [ebp + 0x34], 1
mov dword [ebp + 0x3c], 0x16
call esi
push 0x28
pop edi
push edi
lea eax, [ebp - 0x24]
push ebx
push eax
call sub.MSVCR80.dll_memset
mov ax, word [ebp + 0x58]
mov word [ebp - 0x18], ax
mov ax, word [ebp + 0x5a]
mov word [ebp - 0x16], ax
mov eax, dword [ebp + 0x4c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x50]
lea ecx, [eax + eax]
add esp, 0xc
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x54]
imul ecx, eax
push ebx
lea eax, [ebp + 0x64]
push eax
push edi
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x60]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x10], ecx
call esi
mov edi, dword [ebp + 0x54]
imul edi, dword [ebp + 0x50]
push edi
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
push edi
mov dword [ebp + 0x6c], eax
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
pop ecx
push dword [ebp + 0x6c]
mov dword [ebp + 0x68], eax
push edi
push dword [ebp + 0x14]
call dword [sym.imp.GDI32.dll_GetBitmapBits]
cmp dword [ebp + 0x50], ebx
mov dword [ebp + 0x7c], ebx
jle 0x10016549
mov eax, dword [ebp + 0x50]
sub eax, dword [ebp + 0x7c]
push dword [ebp + 0x54]
dec eax
imul eax, dword [ebp + 0x54]
add eax, dword [ebp + 0x6c]
push eax
mov eax, dword [ebp + 0x7c]
imul eax, dword [ebp + 0x54]
add eax, dword [ebp + 0x68]
push eax
call sub.MSVCR80.dll_memcpy
add esp, 0xc
inc dword [ebp + 0x7c]
mov eax, dword [ebp + 0x7c]
cmp eax, dword [ebp + 0x50]
jl 0x10016519
push ebx
lea eax, [ebp + 0x64]
push eax
push edi
push dword [ebp + 0x68]
push dword [ebp + 0x60]
call esi
mov eax, dword [ebp + 0x20]
imul eax, dword [ebp + 0x24]
push dword [ebp + 0x6c]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.GDI32.dll_GetBitmapBits]
mov eax, dword [ebp + 0x20]
xor edi, edi
cmp eax, ebx
jle 0x1001659c
push dword [ebp + 0x24]
sub eax, edi
dec eax
imul eax, dword [ebp + 0x24]
add eax, dword [ebp + 0x6c]
push eax
mov eax, edi
imul eax, dword [ebp + 0x24]
add eax, dword [ebp + 0x68]
push eax
call sub.MSVCR80.dll_memcpy
mov eax, dword [ebp + 0x20]
add esp, 0xc
inc edi
cmp edi, eax
jl 0x10016574
imul eax, dword [ebp + 0x24]
push ebx
lea ecx, [ebp + 0x64]
push ecx
push eax
push dword [ebp + 0x68]
push dword [ebp + 0x60]
call esi
push dword [ebp + 0x6c]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
push dword [ebp + 0x68]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
pop ecx
pop ecx
push dword [ebp + 0x14]
call esi
push dword [ebp + 0x10]
call esi
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
pop esi
pop edi
pop ebx
add ebp, 0x70
leave
ret