Function at 0x422280
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 0x4506b0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x70
mov eax, dword [0x48100c]
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 0x422348
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 0x42232e
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 0x422333
xor esi, esi
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x38], esi
test esi, esi
je 0x42239a
mov eax, dword [esi + 8]
mov dword [esi + 8], 0
test eax, eax
jne 0x42239a
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x68]
test al, 0x10
je 0x4223ec
cmp dword [ebp - 0x78], 0
mov edx, dword [ebp - 0x5c]
je 0x42237b
mov ecx, dword [edx + edi*4 - 4]
mov edx, dword [ebp - 0x64]
push ecx
push ecx
push ecx
push dword [ebp - 0x7c]
call fcn.00422750
jmp 0x422389
mov edx, dword [edx + edi*4 - 4]
push ecx
push eax
push edx
mov ecx, esi
call fcn.0040e9b0
push dword [ebp - 0x34]
mov edi, eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
test edi, edi
jne 0x4223a4
xor al, al
mov byte [ebp - 0x3d], al
jmp 0x4225e0
lea edx, [ebp - 0x30]
call fcn.0040f6a0
test al, al
je 0x4223c9
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 0x4223db
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 0x4225dd
mov eax, dword [edi]
mov ecx, edi
push 1
mov byte [ebp - 0x3d], 1
call dword [eax]
jmp 0x4225dd
xor ecx, ecx
mov eax, edi
mov edx, 0x50
mul edx
push 0x452818
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004314b0
mov ecx, eax
add esp, 8
mov dword [ebp - 0x54], ecx
test ecx, ecx
jne 0x42241f
xor al, al
mov byte [ebp - 0x3d], al
jmp 0x4225e0
lea eax, [edi + edi*4]
shl eax, 4
push eax
push 0
push ecx
call fcn.00435d50
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 0x422583
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 0x4224a1
mov eax, dword [eax]
mov edx, dword [ebp - 0x64]
push eax
push eax
push dword [ebp - 0x7c]
call fcn.00422750
jmp 0x4224ae
push dword [ebp - 0x68]
mov edx, dword [eax]
mov ecx, esi
push edx
call fcn.0040e9b0
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x42254e
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.00421990
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 0x422551
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 0x422480
test ecx, ecx
je 0x422551
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 0x42260f
or edi, 0xffffffff
mov eax, dword [ebp - 0x44]
test eax, eax
jle 0x422583
mov ecx, dword [ebp - 0x54]
add ecx, 0x4c
mov dword [ebp - 0x48], ecx
nop
mov edx, dword [ecx]
test edx, edx
je 0x422575
push edx
call fcn.0043112d
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 0x422560
push dword [ebp - 0x54]
call fcn.0043112d
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 0x4225c4
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 0x4225e0
test edi, edi
je 0x4225e0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x3d]
test esi, esi
je 0x4225ef
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.004310db
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
cmp edi, 0xffffffff
je 0x42254e
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 0x42254e
cmp dword [ebp - 0x18], 6
jne 0x42254e
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 0x42254e
cmp dword [ebp - 0x18], 0x10
jne 0x42254e
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 0x422654
test ecx, ecx
je 0x422551
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 0x4226f2
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 0x422739
cmp dword [ebp - 0x18], 0x28
jne 0x422739
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 0x422739
mov eax, dword [ebp - 0x18]
cmp eax, dword [esi]
jne 0x422739
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 0x4226c8
mov esi, dword [ebp - 0x74]
jmp 0x422551
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x74]
jmp 0x422551