Function at 0x41f590
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x453550
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x70
mov eax, dword [0x47d00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x64], ecx
mov eax, dword [ebx + 0xc]
xor esi, esi
mov edi, dword [ebx + 8]
mov dword [ebp - 0x60], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x38], esi
and eax, 2
mov dword [ebp - 4], esi
mov dword [ebp - 0x78], eax
jne 0x41f658
push 0x10
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov esi, eax
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x80], esi
test esi, esi
je 0x41f63e
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push dword [ebp - 0x64]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi], vtable.Gdiplus::Bitmap.0
call dword [sym.imp.gdiplus.dll_GdipCreateBitmapFromFile]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 4], eax
jmp 0x41f643
xor esi, esi
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x38], esi
test esi, esi
je 0x41f6aa
mov eax, dword [esi + 8]
mov dword [esi + 8], 0
test eax, eax
jne 0x41f6aa
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x68]
test al, 0x10
je 0x41f6fc
cmp dword [ebp - 0x78], 0
mov edx, dword [ebp - 0x5c]
je 0x41f68b
mov ecx, dword [edx + edi*4 - 4]
mov edx, dword [ebp - 0x64]
push ecx
push ecx
push ecx
push dword [ebp - 0x7c]
call fcn.0041fa60
jmp 0x41f699
mov edx, dword [edx + edi*4 - 4]
push ecx
push eax
push edx
mov ecx, esi
call fcn.0040db30
push dword [ebp - 0x34]
mov edi, eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
test edi, edi
jne 0x41f6b4
xor al, al
mov byte [ebp - 0x3d], al
jmp 0x41f8f0
lea edx, [ebp - 0x30]
call fcn.0040e3d0
test al, al
je 0x41f6d9
push 0
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x60]
push dword [edi + 4]
call dword [sym.imp.gdiplus.dll_GdipSaveImageToFile]
test eax, eax
je 0x41f6eb
mov dword [edi + 8], eax
xor al, al
mov ecx, edi
mov byte [ebp - 0x3d], al
mov eax, dword [edi]
push 1
call dword [eax]
jmp 0x41f8ed
mov eax, dword [edi]
mov ecx, edi
push 1
mov byte [ebp - 0x3d], 1
call dword [eax]
jmp 0x41f8ed
xor ecx, ecx
mov eax, edi
mov edx, 0x50
mul edx
push 0x454798
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004255d2
mov ecx, eax
add esp, 8
mov dword [ebp - 0x54], ecx
test ecx, ecx
jne 0x41f72f
xor al, al
mov byte [ebp - 0x3d], al
jmp 0x41f8f0
lea eax, [edi + edi*4]
shl eax, 4
push eax
push 0
push ecx
call fcn.0043eb00
mov eax, edi
mov dword [ebp - 0x4c], 0
shl eax, 4
or edi, 0xffffffff
add eax, 6
mov dword [ebp - 0x3c], edi
add esp, 0xc
mov dword [ebp - 0x70], eax
mov eax, 1
mov byte [ebp - 4], 1
mov dword [ebp - 0x80], eax
xor edx, edx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x20], 0x10000
mov word [ebp - 0x1c], ax
mov dword [ebp - 0x48], edx
test eax, eax
jle 0x41f893
mov eax, dword [ebp - 0x54]
add eax, 0x40
mov dword [ebp - 0x50], eax
nop dword [eax]
cmp dword [ebp - 0x78], 0
mov eax, dword [ebp - 0x5c]
push ecx
lea eax, [eax + edx*4]
mov dword [ebp - 0x58], eax
je 0x41f7b1
mov eax, dword [eax]
mov edx, dword [ebp - 0x64]
push eax
push eax
push dword [ebp - 0x7c]
call fcn.0041fa60
jmp 0x41f7be
push dword [ebp - 0x68]
mov edx, dword [eax]
mov ecx, esi
push edx
call fcn.0040db30
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x41f85e
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x34]
push dword [ebp - 0x68]
mov dword [edx - 8], eax
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx]
mov dword [edx - 4], eax
add edx, 0xffffffc0
push ecx
mov ecx, dword [ebp - 0x6c]
call fcn.0041ec70
mov byte [ebp - 0x3d], al
mov eax, dword [ebp - 0x6c]
mov ecx, eax
push 1
mov edx, dword [eax]
call dword [edx]
cmp byte [ebp - 0x3d], 0
mov eax, dword [ebp - 0x44]
je 0x41f861
mov edx, dword [ebp - 0x48]
dec eax
mov ecx, dword [ebp - 0x4c]
cmp edx, eax
mov eax, 1
cmove ecx, eax
add dword [ebp - 0x50], 0x50
mov eax, dword [ebp - 0x44]
inc edx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], edx
cmp edx, eax
jl 0x41f790
test ecx, ecx
je 0x41f861
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push dword [ebp - 0x60]
mov dword [ebp - 0x4c], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
test edi, edi
jne 0x41f91f
or edi, 0xffffffff
mov eax, dword [ebp - 0x44]
test eax, eax
jle 0x41f893
mov ecx, dword [ebp - 0x54]
add ecx, 0x4c
mov dword [ebp - 0x48], ecx
nop
mov edx, dword [ecx]
test edx, edx
je 0x41f885
push edx
call fcn.0042524f
mov eax, dword [ebp - 0x44]
add esp, 4
mov ecx, dword [ebp - 0x48]
add ecx, 0x50
sub eax, 1
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], eax
jne 0x41f870
push dword [ebp - 0x54]
call fcn.0042524f
add esp, 4
push dword [ebp - 0x34]
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x41f8d4
push 0
push dword [ebp - 0x60]
push 5
push 2
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
push 0
push dword [ebp - 0x60]
push 5
push 0x2000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov eax, dword [ebp - 0x4c]
cmp eax, 1
sete al
mov byte [ebp - 0x3d], al
cmp edi, 0xffffffff
je 0x41f8f0
test edi, edi
je 0x41f8f0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x3d]
test esi, esi
je 0x41f8ff
mov edx, dword [esi]
mov ecx, esi
push 1
call dword [edx]
mov al, byte [ebp - 0x3d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042520b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
cmp edi, 0xffffffff
je 0x41f85e
push 0
lea eax, [ebp - 0x18]
push eax
push 6
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41f85e
cmp dword [ebp - 0x18], 6
jne 0x41f85e
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x54]
dec eax
add edx, 0x48
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x70]
push 0
mov dword [edx - 0x3c], eax
lea eax, [ebp - 0x18]
push eax
push 0x10
lea eax, [edx - 0x48]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41f85e
cmp dword [ebp - 0x18], 0x10
jne 0x41f85e
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x4c]
add eax, dword [edx]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x58]
cmove ecx, dword [ebp - 0x80]
inc eax
mov dword [ebp - 0x50], eax
add edx, 0x50
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], edx
cmp dword [ebp - 0x50], eax
jl 0x41f964
test ecx, ecx
je 0x41f861
mov esi, dword [ebp - 0x54]
mov dword [ebp - 0x4c], 0
add esi, 0x44
mov dword [ebp - 0x48], 0
mov eax, dword [esi]
lea ecx, [esi - 0x34]
add eax, 0x28
cmp dword [ecx + 0x38], eax
jne 0x41fa02
push 0
lea eax, [ebp - 0x18]
push eax
push 0x28
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41fa49
cmp dword [ebp - 0x18], 0x28
jne 0x41fa49
lea ecx, [esi - 0x34]
push 0
lea eax, [ebp - 0x18]
push eax
push dword [esi]
push dword [ecx + 0x3c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41fa49
mov eax, dword [ebp - 0x18]
cmp eax, dword [esi]
jne 0x41fa49
mov edx, dword [ebp - 0x48]
mov eax, 1
cmp edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x4c]
cmove ecx, eax
mov eax, dword [ebp - 0x44]
inc edx
mov dword [ebp - 0x4c], ecx
add esi, 0x50
mov dword [ebp - 0x48], edx
cmp edx, eax
jl 0x41f9d8
mov esi, dword [ebp - 0x74]
jmp 0x41f861
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x74]
jmp 0x41f861