Function at 0x10057ad0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x60
push ebx
push ebp
push esi
push edi
mov bl, bl
push ecx
pop ecx
xor ebp, ebp
mov dword [esp + 0x10], ebp
mov ebp, ebp
test al, al
test ch, ch
push eax
pop eax
push edx
pop edx
test ch, ch
mov ecx, dword [esp + 0x74]
lea eax, [esp + 0x30]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov dh, dh
mov dword [esp + 0x48], 0x28
test cl, cl
mov edx, dword [esp + 0x34]
mov dword [esp + 0x4c], edx
test bl, bl
mov eax, dword [esp + 0x38]
mov dword [esp + 0x50], eax
push ecx
pop ecx
mov word [esp + 0x54], 1
push ecx
pop ecx
mov word [esp + 0x56], 0x18
mov cl, cl
mov dword [esp + 0x58], ebp
mov dh, dh
mov dword [esp + 0x5c], ebp
mov edx, edx
mov dword [esp + 0x60], ebp
mov ebp, ebp
mov dword [esp + 0x64], ebp
test eax, eax
mov dword [esp + 0x6c], ebp
mov esi, esi
mov dword [esp + 0x68], ebp
mov edx, edx
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
mov ebx, ebx
lea ecx, [ebx + 0x28]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov dword [esp + 0x18], eax
test eax, 0x6b39
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov dword [esp + 0x14], eax
test cl, cl
mov ecx, 0xa
lea esi, [esp + 0x48]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov edi, edi
push 0xf
call dword [sym.imp.GDI32.dll_GetStockObject]
mov edi, eax
test edi, edi
cmp edi, ebp
je 0x10057be3
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowDC]
mov esi, eax
mov dh, dh
push ebp
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
mov edi, eax
mov ch, ch
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov dl, dl
jmp 0x10057be9
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 ecx
pop ecx
cmp edi, ebp
je 0x10057c33
push 1
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
mov al, al
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
test edi, edi
push esi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
test edx, edx
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
mov ebp, ebp
cmp esi, 0xffffffff
jne 0x10057c79
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
test eax, 0x5533
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov al, al
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
mov word [esp + 0x20], 0x4d42
add ebx, 0x36
mov al, al
mov dword [esp + 0x22], ebx
mov bh, bh
mov word [esp + 0x26], bp
mov al, al
mov word [esp + 0x28], bp
mov bh, bh
mov dword [esp + 0x2a], 0x36
test eax, 0x5614
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
mov cl, cl
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]
test edx, edx
push edi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
test edi, edi
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
test ah, ah
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60
ret