Function at 0x461460
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b95e5
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x634b28]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x14]
mov eax, dword fs:[0x2c]
mov ecx, dword [0x63fe64]
mov dword [ebp - 4], 0
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x63d1d4]
cmp eax, dword [ecx + 4]
jg 0x46184b
xor eax, eax
mov edi, 0x63d1d8
lock xadd dword [edi], eax
mov ebx, 1
test eax, eax
jne 0x4614f6
push eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x64]
push eax
push 0x63d1d0
mov dword [ebp - 0x64], ebx
call sub.gdiplus.dll_GdiplusStartup
test eax, eax
mov eax, ebx
sete byte [0x63d1dc]
lock xadd dword [edi], eax
cmp byte [0x63d1dc], 0
je 0x4617f8
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
sub eax, ecx
cmp eax, 4
jb 0x4617fb
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push esi
mov dword [ebp - 0x48], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x4c], edi
cmp edi, 0xffffffff
je 0x4617f8
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x48]
sub ecx, dword [ebp + 8]
push 0
push eax
push 6
lea eax, [ebp - 0x70]
sar ecx, 2
push eax
push edi
mov dword [ebp - 0x70], 0x10000
mov word [ebp - 0x6c], cx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], ecx
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov edx, dword [ebp + 8]
sub ecx, edx
sar ecx, 2
mov byte [ebp - 4], 1
test ecx, ecx
je 0x4615b0
lea eax, [ebp - 0x39]
push eax
push ecx
lea ecx, [ebp - 0x60]
call fcn.004610b0
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x60]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x54], esi
lea ecx, [ecx]
sub eax, edx
push 1
sar eax, 2
push 0
shl eax, 4
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x74], eax
cmp ebx, eax
je 0x46177d
lea eax, [esi + 2]
mov dword [ebp - 0x50], eax
jmp 0x4615e0
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
test esi, esi
je 0x461611
mov eax, dword [ebx]
lea ecx, [ebp - 0x40]
push ecx
push eax
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov dword [ebp - 0x40], 0
call sub.gdiplus.dll_GdipCreateBitmapFromHICON
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x40]
mov dword [esi + 4], eax
jmp 0x461613
xor esi, esi
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push eax
push dword [esi + 4]
call sub.gdiplus.dll_GdipGetImageWidth
test eax, eax
je 0x46162d
mov dword [esi + 8], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
push dword [esi + 4]
call sub.gdiplus.dll_GdipGetImageHeight
test eax, eax
je 0x461647
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x44]
push 6
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x78], eax
push dword [esi + 4]
call sub.gdiplus.dll_GdipImageRotateFlip
test eax, eax
je 0x461675
mov dword [esi + 8], eax
lea eax, [ebp - 0x9c]
push eax
push 0x26200a
push 3
lea eax, [ebp - 0x84]
push eax
push dword [esi + 4]
call sub.gdiplus.dll_GdipBitmapLockBits
test eax, eax
je 0x46169b
mov dword [esi + 8], eax
jmp 0x46169d
xor eax, eax
test eax, eax
jne 0x461765
mov edi, dword [ebp - 0x44]
imul edi, dword [ebp - 0x40]
push 1
push eax
push eax
push dword [ebp - 0x4c]
shl edi, 2
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x40]
push 0
mov word [ecx + 0xa], ax
mov eax, dword [ebp - 0x44]
mov dword [ecx], 0x10000
mov byte [ecx - 1], al
mov eax, 0x20
mov byte [ecx - 2], dl
mov word [ecx + 4], ax
lea eax, [edi + 0x28]
mov dword [ecx + 6], eax
mov eax, dword [ebp - 0x44]
add eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x48]
push eax
push 0x28
lea eax, [ebp - 0x38]
mov dword [ebp - 0x20], 0
push eax
push dword [ebp - 0x4c]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x38], 0x28
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x2c], 0x200001
mov dword [ebp - 0x24], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x48]
push eax
push edi
push dword [ebp - 0x8c]
mov edi, dword [ebp - 0x4c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x9c]
push eax
push dword [esi + 4]
call sub.gdiplus.dll_GdipBitmapUnlockBits
test eax, eax
je 0x461765
mov dword [esi + 8], eax
mov eax, dword [esi]
mov ecx, esi
add dword [ebp - 0x50], 0x10
push 1
call dword [eax]
add ebx, 4
cmp ebx, dword [ebp - 0x74]
jne 0x4615e0
push 0
push 0
push 6
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [ebp - 0x54]
mov esi, ebx
cmp esi, dword [ebp - 0x5c]
je 0x4617b1
mov ebx, dword [ebp - 0x5c]
push 0
lea eax, [ebp - 0x48]
push eax
push 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
add esi, 0x10
cmp esi, ebx
jne 0x461797
mov ebx, dword [ebp - 0x54]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x39], 1
test ebx, ebx
je 0x4617f0
mov ecx, dword [ebp - 0x68]
mov eax, ebx
sub ecx, ebx
and ecx, 0xfffffff0
cmp ecx, 0x1000
jb 0x4617e6
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46188b
push ecx
push ebx
call fcn.0057b69e
add esp, 8
mov ecx, dword [ebp + 8]
mov bl, byte [ebp - 0x39]
jmp 0x4617fd
mov ecx, dword [ebp + 8]
xor bl, bl
test ecx, ecx
je 0x46182d
mov edx, dword [ebp + 0x10]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffc
cmp edx, 0x1000
jb 0x461823
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46188b
push edx
push ecx
call fcn.0057b69e
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057b6ac
mov esp, ebp
pop ebp
ret
push 0x63d1d4
call fcn.0057bb6b
add esp, 4
cmp dword [0x63d1d4], 0xffffffff
jne 0x4614b8
push 0x5c6e00
mov dword [0x63d1d0], 0
call fcn.0057ba23
push 0x63d1d4
call fcn.0057bb21
add esp, 8
jmp 0x4614b8
call fcn.00582360
int3