Function at 0x100577b0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x60
push ebx
push ebp
push esi
push edi
mov dh, dh
test esi, esi
xor ebp, ebp
mov dword [esp + 0x10], ebp
test eax, 0x79ca
mov ebx, ebx
mov eax, eax
xchg ebx, eax
xchg ebx, eax
test dl, dl
mov edx, edx
mov ecx, dword [esp + 0x74]
lea eax, [esp + 0x30]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, ecx
mov dword [esp + 0x48], 0x28
test eax, 0x6293
mov edx, dword [esp + 0x34]
mov dword [esp + 0x4c], edx
mov bh, bh
mov eax, dword [esp + 0x38]
mov dword [esp + 0x50], eax
test bl, bl
mov word [esp + 0x54], 1
mov edi, edi
mov word [esp + 0x56], 0x18
push edx
pop edx
mov dword [esp + 0x58], ebp
mov cl, cl
mov dword [esp + 0x5c], ebp
mov al, al
mov dword [esp + 0x60], ebp
test cl, cl
mov dword [esp + 0x64], ebp
mov dl, dl
mov dword [esp + 0x6c], ebp
test dh, dh
mov dword [esp + 0x68], ebp
mov cl, cl
mov eax, dword [esp + 0x34]
lea eax, [eax + eax*2]
lea eax, [eax*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
mov ebx, eax
sar ebx, 5
imul ebx, dword [esp + 0x38]
add ebx, ebx
add ebx, ebx
test dl, dl
lea ecx, [ebx + 0x28]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov dword [esp + 0x18], eax
test eax, 0x1f39
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov dword [esp + 0x14], eax
test edx, edx
mov ecx, 0xa
lea esi, [esp + 0x48]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov esi, esi
push 0xf
call dword [sym.imp.GDI32.dll_GetStockObject]
mov edi, eax
test ch, ch
cmp edi, ebp
je 0x100578c9
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowDC]
mov esi, eax
mov eax, eax
push ebp
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
mov edi, eax
mov bh, bh
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ebp, ebp
jmp 0x100578cf
mov esi, dword [esp + 0x1c]
mov edi, ebp
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
push ebp
push eax
add eax, 0x28
push eax
mov eax, dword [esp + 0x80]
push edx
push ebp
push eax
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
push eax
pop eax
cmp edi, ebp
je 0x1005791c
push 1
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
xchg ebx, eax
xchg ebx, eax
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov cl, cl
push esi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
test eax, 0x426f
mov ecx, dword [esp + 0x78]
push ebp
push 0x8000080
push 2
push ebp
push ebp
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
push edx
pop edx
cmp esi, 0xffffffff
jne 0x1005795f
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov edx, edx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
mov word [esp + 0x20], 0x4d42
add ebx, 0x36
test ch, ch
mov dword [esp + 0x22], ebx
push ecx
pop ecx
mov word [esp + 0x26], bp
mov eax, eax
mov word [esp + 0x28], bp
test ch, ch
mov dword [esp + 0x2a], 0x36
push ecx
pop ecx
mov edi, dword [sym.imp.KERNEL32.DLL_WriteFile]
push ebp
lea edx, [esp + 0x14]
push edx
push 0xe
lea eax, [esp + 0x2c]
push eax
push esi
call edi
push eax
pop eax
mov edx, dword [esp + 0x14]
push ebp
lea ecx, [esp + 0x14]
push ecx
push ebx
push edx
push esi
call edi
mov cl, cl
mov edi, dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
mov edi, edi
push edi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov esi, esi
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
test esi, esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60
ret